peachsim 0.1.1716 → 0.1.1728
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 +82 -822
- 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 +750 -0
- package/cli/commands/serve.ts +6 -0
- package/cli/commands/shell-url.ts +834 -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 +13 -6
- package/detox/index.ts +187 -23
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +1 -1
- package/dist-lib/auth/shared-session.cjs +1 -1
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +38000 -31658
- 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 +184 -60
- package/dist-lib/dev-bundle-resolution.cjs +14 -13
- package/dist-lib/expo-swift-bundle.cjs +18199 -11834
- package/dist-lib/expo-swift-metadata.cjs +4 -1
- package/dist-lib/expo-swift-metadata.mjs +3 -1
- package/dist-lib/home-paths.cjs +21 -2
- package/dist-lib/host/bridge-host.cjs +26509 -23850
- package/dist-lib/host/fetch-proxy-handler.cjs +221 -222
- 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 +876 -389
- 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 +127 -16
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -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 +883 -404
- package/dist-lib/native-app-identity-project.cjs +694 -280
- package/dist-lib/native-app-identity-project.mjs +490 -83
- 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 +1 -1
- 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 +392 -224
- package/dist-lib/react-native-host-modules.cjs +32 -2
- package/dist-lib/react-native-host-modules.mjs +32 -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 +61838 -47851
- package/dist-lib/swift-compile.cjs +583 -360
- package/dist-lib/swift-compile.mjs +496 -275
- 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 +4453 -2231
- package/dist-lib/vite.cjs +230 -228
- 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/image-loader.d.ts +7 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +1 -11
- package/dist-types/packages/peach-engine/src/engine/types.d.ts +3 -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/shell-protocol.d.ts +4 -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 +23 -1
- 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/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/scripts/dev-server-scanner.ts +12 -25
- 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 +2 -0
- 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.h +75 -9
- 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.modulemap +5 -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/fcntl.h +4 -2
- 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/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 +1 -0
- package/skills/contrast/SKILL.md +2 -1
- package/skills/peach-test/SKILL.md +7 -3
- package/src/admitted-mac-build.ts +3 -0
- package/src/android-app-identity.ts +18 -0
- package/src/android-root-module.ts +9 -9
- package/src/appPackageContract.ts +81 -0
- package/src/bridge-contract.ts +50 -0
- package/src/bundle-channel.mjs +21 -4
- package/src/dev-bundle-resolution.ts +7 -27
- package/src/dom-source-reference.ts +15 -0
- package/src/expo-discovery-cache.ts +127 -23
- package/src/expo-manifest-body.ts +33 -0
- package/src/expo-native-workspace.ts +38 -13
- package/src/expo-swift-host.ts +264 -62
- package/src/expoSwiftContract.ts +3 -0
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +35 -1
- package/src/host/app-package-handler.ts +47 -0
- package/src/host/bridge-host.ts +3 -0
- package/src/host/staged-host-files.ts +18 -0
- package/src/index.ts +3 -0
- package/src/kotlin-host.ts +21 -18
- package/src/kotlin-instance-source.ts +126 -0
- package/src/menu.ts +7 -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/nitro-adapter.lock.json +268 -268
- package/src/nitro-bundle.ts +8 -0
- package/src/nitro-compile.ts +35 -9
- package/src/nitro-dependencies.ts +21 -19
- package/src/nitro-source.ts +4 -0
- package/src/nitroContract.ts +7 -0
- package/src/react-native-bridge-modules.ts +68 -42
- package/src/react-native-host-modules.ts +31 -1
- package/src/reactNativeConfigurationContract.ts +14 -0
- package/src/reap-browser.ts +15 -3
- package/src/sdk.ts +5 -0
- package/src/settingsContract.ts +27 -1
- package/src/sim-client.ts +4 -1
- package/src/storageSnapshotContract.ts +3 -0
- package/src/swift-compile.ts +221 -41
- package/src/swift-coverage/provenance.ts +1 -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 +1 -1
- package/src/swift-cxx-reachable.ts +2 -1
- package/src/swift-distribution.lock.json +14 -13
- package/src/swift-host.ts +95 -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 +592 -57
- package/src/swift-standins.ts +430 -49
- package/src/swift-submit.ts +3 -1
- package/src/swift-toolchain.ts +140 -17
- package/src/turbo-codegen-intake.ts +91 -0
- package/src/vite-plugin-one.ts +13 -9
- package/src/vite-plugin.ts +28 -15
- package/src/xcode-project.ts +223 -22
package/dist-lib/metro.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1728 | (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": "1ecc9c90d7e293f9bdc57db5bf90f6670d2aed8f8f9bd647cd55b2c70347aa38", "swift-coverage/indexing.ts": "02b9e91dcee1f48b74bcc8e35fe5dda5442fa235221faf82f0cbaa416a7d5409", "swift-coverage/types.ts": "cfc696535808957bd491dc5f5eefc991f65395eb6fc7ea377c31a12b5c4c3b57", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "9b9efa33fcd6d78e3ab4218b0340a6bf96832faa98ea04f3966167f691043462", "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": "3142399c278b7759ddd50c33a5569bb1a4eab38d19b3f0923064907c90e08e27", "home-paths.ts": "20c49992c57b1e7d279454ff4587208ae3d888bb2e318674a6d405750cdbdc24", "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
|
|
|
@@ -762,7 +764,7 @@ var init_node_http_fetch = __esm({
|
|
|
762
764
|
var runtime_companion_default;
|
|
763
765
|
var init_runtime_companion = __esm({
|
|
764
766
|
"runtime-companion.json"() {
|
|
765
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
767
|
+
runtime_companion_default = { abi: 1, sha256: "aca3aa069c8104a207ce2d98944ba1ed096878d12c25e9e9d44c3df0e2a63323", file: "node/cli-aca3aa069c8104a207ce2d98944ba1ed096878d12c25e9e9d44c3df0e2a63323.cjs" };
|
|
766
768
|
}
|
|
767
769
|
});
|
|
768
770
|
|
|
@@ -812,8 +814,16 @@ function activeRuntimeFile() {
|
|
|
812
814
|
function cacheDir() {
|
|
813
815
|
return import_node_path7.default.join(rnxHomeDir(), "cache");
|
|
814
816
|
}
|
|
817
|
+
function buildersRootEnv() {
|
|
818
|
+
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
819
|
+
return root ? root : null;
|
|
820
|
+
}
|
|
821
|
+
function swiftCacheDir() {
|
|
822
|
+
const root = buildersRootEnv();
|
|
823
|
+
return root ? import_node_path7.default.join(root, "peach-cache") : cacheDir();
|
|
824
|
+
}
|
|
815
825
|
function swiftPackageCacheOptions() {
|
|
816
|
-
const root = import_node_path7.default.join(
|
|
826
|
+
const root = import_node_path7.default.join(swiftCacheDir(), "swiftpm");
|
|
817
827
|
return ["cache", "config", "security"].flatMap((name2) => [
|
|
818
828
|
`--${name2}-path`,
|
|
819
829
|
import_node_path7.default.join(root, name2)
|
|
@@ -827,7 +837,7 @@ function readActiveRuntime() {
|
|
|
827
837
|
return null;
|
|
828
838
|
}
|
|
829
839
|
}
|
|
830
|
-
var import_node_fs7, import_node_os2, import_node_path7, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, DAEMON_LOCKFILE_MAX_BYTES;
|
|
840
|
+
var import_node_fs7, import_node_os2, import_node_path7, PEACH_HOME_ENV, ACTIVE_RUNTIME_FILE, BUILDERS_ROOT_ENV, DAEMON_LOCKFILE_MAX_BYTES;
|
|
831
841
|
var init_home_paths = __esm({
|
|
832
842
|
"src/home-paths.ts"() {
|
|
833
843
|
"use strict";
|
|
@@ -837,6 +847,7 @@ var init_home_paths = __esm({
|
|
|
837
847
|
import_node_path7 = __toESM(require("node:path"), 1);
|
|
838
848
|
PEACH_HOME_ENV = "PEACH_HOME";
|
|
839
849
|
ACTIVE_RUNTIME_FILE = "active";
|
|
850
|
+
BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
840
851
|
DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
841
852
|
}
|
|
842
853
|
});
|
|
@@ -2754,22 +2765,22 @@ var init_kotlin_toolchain = __esm({
|
|
|
2754
2765
|
|
|
2755
2766
|
// src/swift-source-file.ts
|
|
2756
2767
|
function relativeInside(root, file) {
|
|
2757
|
-
const relative3 =
|
|
2758
|
-
return relative3 === ".." || relative3.startsWith(`..${
|
|
2768
|
+
const relative3 = import_node_path17.default.relative(root, file);
|
|
2769
|
+
return relative3 === ".." || relative3.startsWith(`..${import_node_path17.default.sep}`) || import_node_path17.default.isAbsolute(relative3) ? null : relative3;
|
|
2759
2770
|
}
|
|
2760
2771
|
function packageInputPath(canonicalRoot, file) {
|
|
2761
|
-
const canonicalFile =
|
|
2772
|
+
const canonicalFile = import_node_fs16.default.realpathSync(file);
|
|
2762
2773
|
if (relativeInside(canonicalRoot, canonicalFile) === null) {
|
|
2763
2774
|
throw new Error(`swift input escapes the selected package: ${file}`);
|
|
2764
2775
|
}
|
|
2765
2776
|
return canonicalFile;
|
|
2766
2777
|
}
|
|
2767
2778
|
function readPackageFile(root, file, maxBytes) {
|
|
2768
|
-
const canonicalFile = packageInputPath(
|
|
2769
|
-
const expected =
|
|
2770
|
-
const fd =
|
|
2779
|
+
const canonicalFile = packageInputPath(import_node_fs16.default.realpathSync(root), file);
|
|
2780
|
+
const expected = import_node_fs16.default.statSync(canonicalFile);
|
|
2781
|
+
const fd = import_node_fs16.default.openSync(canonicalFile, import_node_fs16.default.constants.O_RDONLY | import_node_fs16.default.constants.O_NOFOLLOW);
|
|
2771
2782
|
try {
|
|
2772
|
-
const stat =
|
|
2783
|
+
const stat = import_node_fs16.default.fstatSync(fd);
|
|
2773
2784
|
if (stat.dev !== expected.dev || stat.ino !== expected.ino) {
|
|
2774
2785
|
throw new Error(`swift input changed while opening: ${file}`);
|
|
2775
2786
|
}
|
|
@@ -2779,25 +2790,25 @@ function readPackageFile(root, file, maxBytes) {
|
|
|
2779
2790
|
const bytes = Buffer.alloc(stat.size + 1);
|
|
2780
2791
|
let offset = 0;
|
|
2781
2792
|
while (offset < bytes.length) {
|
|
2782
|
-
const count =
|
|
2793
|
+
const count = import_node_fs16.default.readSync(fd, bytes, offset, bytes.length - offset, null);
|
|
2783
2794
|
if (count === 0) break;
|
|
2784
2795
|
offset += count;
|
|
2785
2796
|
}
|
|
2786
|
-
if (offset !== stat.size ||
|
|
2797
|
+
if (offset !== stat.size || import_node_fs16.default.fstatSync(fd).size !== stat.size) {
|
|
2787
2798
|
throw new Error(`swift input changed while reading: ${file}`);
|
|
2788
2799
|
}
|
|
2789
2800
|
return bytes.subarray(0, offset);
|
|
2790
2801
|
} finally {
|
|
2791
|
-
|
|
2802
|
+
import_node_fs16.default.closeSync(fd);
|
|
2792
2803
|
}
|
|
2793
2804
|
}
|
|
2794
|
-
var
|
|
2805
|
+
var import_node_fs16, import_node_path17;
|
|
2795
2806
|
var init_swift_source_file = __esm({
|
|
2796
2807
|
"src/swift-source-file.ts"() {
|
|
2797
2808
|
"use strict";
|
|
2798
2809
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2799
|
-
|
|
2800
|
-
|
|
2810
|
+
import_node_fs16 = __toESM(require("node:fs"), 1);
|
|
2811
|
+
import_node_path17 = __toESM(require("node:path"), 1);
|
|
2801
2812
|
}
|
|
2802
2813
|
});
|
|
2803
2814
|
|
|
@@ -2831,7 +2842,7 @@ var init_swift_submit = __esm({
|
|
|
2831
2842
|
});
|
|
2832
2843
|
|
|
2833
2844
|
// src/nitro-dependencies.ts
|
|
2834
|
-
var import_node_child_process6, import_node_util3, run3;
|
|
2845
|
+
var import_node_child_process6, import_node_util3, run3, DOUBLE_CONVERSION_WASM32_BACKPORT, RN_DEPENDENCIES;
|
|
2835
2846
|
var init_nitro_dependencies = __esm({
|
|
2836
2847
|
"src/nitro-dependencies.ts"() {
|
|
2837
2848
|
"use strict";
|
|
@@ -2844,6 +2855,54 @@ var init_nitro_dependencies = __esm({
|
|
|
2844
2855
|
init_swift_source_file();
|
|
2845
2856
|
init_swift_submit();
|
|
2846
2857
|
run3 = (0, import_node_util3.promisify)(import_node_child_process6.execFile);
|
|
2858
|
+
DOUBLE_CONVERSION_WASM32_BACKPORT = {
|
|
2859
|
+
upstreamCommit: "8857767d5b2f5a035321e3712e8cd0008840ba6b",
|
|
2860
|
+
originalSha256: "b495b11f7b61693486894f747add5b454894b8b3ca41aa1610d370ba16407ab7",
|
|
2861
|
+
derivedSha256: "642d9f83289672def295f6a0a4f8c94823c20c3186e2b1b9ec36b436cb366da8",
|
|
2862
|
+
before: " defined(__AARCH64EL__)\n",
|
|
2863
|
+
after: " defined(__AARCH64EL__) || defined(__wasm32__)\n"
|
|
2864
|
+
};
|
|
2865
|
+
RN_DEPENDENCIES = {
|
|
2866
|
+
"0.83.1": [
|
|
2867
|
+
{
|
|
2868
|
+
name: "RCT-Folly",
|
|
2869
|
+
url: "https://github.com/facebook/folly/archive/v2024.11.18.00.tar.gz",
|
|
2870
|
+
sha256: "b2c6879ba8ba625218d1ab9eefcc1611a9003d05bc2cb1a38f3bae21892e5167",
|
|
2871
|
+
prefix: "folly-2024.11.18.00",
|
|
2872
|
+
headers: { from: "folly", to: "folly" }
|
|
2873
|
+
},
|
|
2874
|
+
{
|
|
2875
|
+
name: "boost",
|
|
2876
|
+
url: "https://github.com/react-native-community/boost-for-react-native/archive/v1.84.0.tar.gz",
|
|
2877
|
+
sha256: "954a04e9468dee21259937b83a2b21c3985cc96f91ee0152a34a7f0f752093e8",
|
|
2878
|
+
prefix: "boost-for-react-native-1.84.0",
|
|
2879
|
+
headers: { from: "boost", to: "boost" }
|
|
2880
|
+
},
|
|
2881
|
+
{
|
|
2882
|
+
// the podspec's prepare_command renames src to double-conversion.
|
|
2883
|
+
name: "DoubleConversion",
|
|
2884
|
+
url: "https://github.com/google/double-conversion/archive/v1.1.6.tar.gz",
|
|
2885
|
+
sha256: "6b850acd8e88515764472c52973277744a945f9a769a93968efc42efef64d67a",
|
|
2886
|
+
prefix: "double-conversion-1.1.6",
|
|
2887
|
+
headers: { from: "src", to: "double-conversion" },
|
|
2888
|
+
backport: { file: "src/utils.h", ...DOUBLE_CONVERSION_WASM32_BACKPORT }
|
|
2889
|
+
},
|
|
2890
|
+
{
|
|
2891
|
+
name: "fmt",
|
|
2892
|
+
url: "https://github.com/fmtlib/fmt/archive/11.0.2.tar.gz",
|
|
2893
|
+
sha256: "6cb1e6d37bdcb756dbbe59be438790db409cdb4868c66e888d5df9f13f7c027f",
|
|
2894
|
+
prefix: "fmt-11.0.2",
|
|
2895
|
+
headers: { from: "include/fmt", to: "fmt" }
|
|
2896
|
+
},
|
|
2897
|
+
{
|
|
2898
|
+
name: "fast_float",
|
|
2899
|
+
url: "https://github.com/fastfloat/fast_float/archive/v8.0.0.tar.gz",
|
|
2900
|
+
sha256: "f312f2dc34c61e665f4b132c0307d6f70ad9420185fa831911bc24408acf625d",
|
|
2901
|
+
prefix: "fast_float-8.0.0",
|
|
2902
|
+
headers: { from: "include/fast_float", to: "fast_float" }
|
|
2903
|
+
}
|
|
2904
|
+
]
|
|
2905
|
+
};
|
|
2847
2906
|
}
|
|
2848
2907
|
});
|
|
2849
2908
|
|
|
@@ -2855,19 +2914,19 @@ function readJson(root, relative3) {
|
|
|
2855
2914
|
return JSON.parse(
|
|
2856
2915
|
readPackageFile(
|
|
2857
2916
|
root,
|
|
2858
|
-
|
|
2917
|
+
import_node_path18.default.join(root, relative3),
|
|
2859
2918
|
MAX_SWIFT_COMPILE_SOURCE_BYTES
|
|
2860
2919
|
).toString("utf8")
|
|
2861
2920
|
);
|
|
2862
2921
|
}
|
|
2863
2922
|
function registrations(root) {
|
|
2864
|
-
const directory =
|
|
2865
|
-
const initializers =
|
|
2923
|
+
const directory = import_node_path18.default.join(root, "nitrogen/generated/ios");
|
|
2924
|
+
const initializers = import_node_fs17.default.readdirSync(directory).filter((file) => file.endsWith("Autolinking.mm"));
|
|
2866
2925
|
if (initializers.length !== 1)
|
|
2867
2926
|
throw new Error(`${root}: expected one generated Nitro iOS initializer`);
|
|
2868
2927
|
const source = readPackageFile(
|
|
2869
2928
|
root,
|
|
2870
|
-
|
|
2929
|
+
import_node_path18.default.join(directory, initializers[0]),
|
|
2871
2930
|
MAX_SWIFT_COMPILE_SOURCE_BYTES
|
|
2872
2931
|
).toString("utf8");
|
|
2873
2932
|
const namespaces = [
|
|
@@ -2909,12 +2968,12 @@ function registrations(root) {
|
|
|
2909
2968
|
return { namespace, swiftModule, classes, views: viewNames(root, classes) };
|
|
2910
2969
|
}
|
|
2911
2970
|
function viewNames(root, classes) {
|
|
2912
|
-
const directory =
|
|
2913
|
-
if (!
|
|
2971
|
+
const directory = import_node_path18.default.join(root, "nitrogen/generated/shared/json");
|
|
2972
|
+
if (!import_node_fs17.default.existsSync(directory)) return /* @__PURE__ */ new Set();
|
|
2914
2973
|
const views = /* @__PURE__ */ new Set();
|
|
2915
|
-
for (const file of
|
|
2974
|
+
for (const file of import_node_fs17.default.readdirSync(directory)) {
|
|
2916
2975
|
if (!file.endsWith("Config.json")) continue;
|
|
2917
|
-
const config = readJson(root,
|
|
2976
|
+
const config = readJson(root, import_node_path18.default.join("nitrogen/generated/shared/json", file));
|
|
2918
2977
|
const name2 = object(config) ? config.uiViewClassName : void 0;
|
|
2919
2978
|
if (typeof name2 === "string" && classes.some((entry) => entry.name === name2))
|
|
2920
2979
|
views.add(name2);
|
|
@@ -2922,22 +2981,22 @@ function viewNames(root, classes) {
|
|
|
2922
2981
|
return views;
|
|
2923
2982
|
}
|
|
2924
2983
|
function hasNitroIosInitializer(root) {
|
|
2925
|
-
const generated =
|
|
2926
|
-
return
|
|
2984
|
+
const generated = import_node_path18.default.join(root, "nitrogen/generated/ios");
|
|
2985
|
+
return import_node_fs17.default.existsSync(generated) && import_node_fs17.default.readdirSync(generated).some((file) => file.endsWith("Autolinking.mm"));
|
|
2927
2986
|
}
|
|
2928
2987
|
function nitroRegisteredNames(root) {
|
|
2929
2988
|
if (!hasNitroIosInitializer(root)) return null;
|
|
2930
2989
|
const { classes, views } = registrations(root);
|
|
2931
2990
|
return { names: classes.map(({ name: name2 }) => name2), views: [...views].sort() };
|
|
2932
2991
|
}
|
|
2933
|
-
var import_node_child_process7,
|
|
2992
|
+
var import_node_child_process7, import_node_fs17, import_node_path18, import_node_util4, run4;
|
|
2934
2993
|
var init_nitro_source = __esm({
|
|
2935
2994
|
"src/nitro-source.ts"() {
|
|
2936
2995
|
"use strict";
|
|
2937
2996
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2938
2997
|
import_node_child_process7 = require("node:child_process");
|
|
2939
|
-
|
|
2940
|
-
|
|
2998
|
+
import_node_fs17 = __toESM(require("node:fs"), 1);
|
|
2999
|
+
import_node_path18 = __toESM(require("node:path"), 1);
|
|
2941
3000
|
import_node_util4 = require("node:util");
|
|
2942
3001
|
init_internal_child();
|
|
2943
3002
|
init_nitro_dependencies();
|
|
@@ -5940,25 +5999,25 @@ var init_browser = __esm({
|
|
|
5940
5999
|
});
|
|
5941
6000
|
|
|
5942
6001
|
// cli/commands/nodeRepoFileReader.ts
|
|
5943
|
-
var
|
|
6002
|
+
var import_node_fs18, nodeRepoFileReader;
|
|
5944
6003
|
var init_nodeRepoFileReader = __esm({
|
|
5945
6004
|
"cli/commands/nodeRepoFileReader.ts"() {
|
|
5946
6005
|
"use strict";
|
|
5947
6006
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
5948
|
-
|
|
6007
|
+
import_node_fs18 = require("node:fs");
|
|
5949
6008
|
nodeRepoFileReader = {
|
|
5950
|
-
exists:
|
|
5951
|
-
readText: (filePath) => (0,
|
|
5952
|
-
entries: (directory) => (0,
|
|
6009
|
+
exists: import_node_fs18.existsSync,
|
|
6010
|
+
readText: (filePath) => (0, import_node_fs18.readFileSync)(filePath, "utf8"),
|
|
6011
|
+
entries: (directory) => (0, import_node_fs18.readdirSync)(directory, { withFileTypes: true }).map((entry) => ({
|
|
5953
6012
|
name: entry.name,
|
|
5954
6013
|
directory: entry.isDirectory()
|
|
5955
6014
|
})),
|
|
5956
|
-
isDirectory: (filePath) => (0,
|
|
6015
|
+
isDirectory: (filePath) => (0, import_node_fs18.statSync)(filePath).isDirectory(),
|
|
5957
6016
|
readMetadata(filePath) {
|
|
5958
6017
|
try {
|
|
5959
|
-
const info = (0,
|
|
6018
|
+
const info = (0, import_node_fs18.lstatSync)(filePath);
|
|
5960
6019
|
if (!info.isFile() || info.size > 4 * 1024 * 1024) return null;
|
|
5961
|
-
return (0,
|
|
6020
|
+
return (0, import_node_fs18.readFileSync)(filePath, "utf8");
|
|
5962
6021
|
} catch {
|
|
5963
6022
|
return null;
|
|
5964
6023
|
}
|
|
@@ -5981,7 +6040,7 @@ function scanRepository(root) {
|
|
|
5981
6040
|
directories.push(next.dir);
|
|
5982
6041
|
let handle;
|
|
5983
6042
|
try {
|
|
5984
|
-
handle = (0,
|
|
6043
|
+
handle = (0, import_node_fs19.opendirSync)(next.dir);
|
|
5985
6044
|
} catch {
|
|
5986
6045
|
unreadable++;
|
|
5987
6046
|
continue;
|
|
@@ -5996,7 +6055,7 @@ function scanRepository(root) {
|
|
|
5996
6055
|
truncated = true;
|
|
5997
6056
|
continue;
|
|
5998
6057
|
}
|
|
5999
|
-
pending.push({ dir: (0,
|
|
6058
|
+
pending.push({ dir: (0, import_node_path19.join)(next.dir, entry.name), depth: next.depth + 1 });
|
|
6000
6059
|
}
|
|
6001
6060
|
} finally {
|
|
6002
6061
|
handle.closeSync();
|
|
@@ -6026,7 +6085,7 @@ function readProjectJson(path21, files = nodeRepoFileReader) {
|
|
|
6026
6085
|
}
|
|
6027
6086
|
}
|
|
6028
6087
|
function readProjectManifest(dir, files = nodeRepoFileReader) {
|
|
6029
|
-
const parsed = readProjectJson((0,
|
|
6088
|
+
const parsed = readProjectJson((0, import_node_path19.join)(dir, "package.json"), files);
|
|
6030
6089
|
if (!parsed || typeof parsed !== "object") return null;
|
|
6031
6090
|
const record = (value) => {
|
|
6032
6091
|
if (!value || typeof value !== "object") return {};
|
|
@@ -6043,13 +6102,13 @@ function readProjectManifest(dir, files = nodeRepoFileReader) {
|
|
|
6043
6102
|
devDependencies: record(metadataValue(parsed, "devDependencies"))
|
|
6044
6103
|
};
|
|
6045
6104
|
}
|
|
6046
|
-
var
|
|
6105
|
+
var import_node_fs19, import_node_path19, import_json52, REPORT_SKIP_DIRS, PODFILE_NEW_ARCH_MARK, PODFILE_NEW_ARCH_RUBY;
|
|
6047
6106
|
var init_detect = __esm({
|
|
6048
6107
|
"cli/commands/detect.ts"() {
|
|
6049
6108
|
"use strict";
|
|
6050
6109
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6051
|
-
|
|
6052
|
-
|
|
6110
|
+
import_node_fs19 = require("node:fs");
|
|
6111
|
+
import_node_path19 = require("node:path");
|
|
6053
6112
|
import_json52 = __toESM(require_lib(), 1);
|
|
6054
6113
|
init_browser();
|
|
6055
6114
|
init_nodeRepoFileReader();
|
|
@@ -6184,7 +6243,7 @@ function resolveAppStubs(appDir, config, configDir) {
|
|
|
6184
6243
|
const { modules, views, hybridObjects } = expandStubs(appDir, source);
|
|
6185
6244
|
assertRegisteredHybridObjects(appDir, source, hybridObjects);
|
|
6186
6245
|
for (const [name2, answer] of Object.entries(hybridObjects))
|
|
6187
|
-
nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0,
|
|
6246
|
+
nativeHybridObjects[name2] = answer === "unsupported" ? answer : { file: (0, import_node_path20.resolve)(source.baseDir, answer) };
|
|
6188
6247
|
for (const [name2, stub] of Object.entries(modules))
|
|
6189
6248
|
nativeModules[name2] = lowerStub(stub, source.baseDir);
|
|
6190
6249
|
for (const [name2, stub] of Object.entries(views))
|
|
@@ -6249,10 +6308,10 @@ function assertRegisteredHybridObjects(appDir, source, hybridObjects) {
|
|
|
6249
6308
|
);
|
|
6250
6309
|
}
|
|
6251
6310
|
function lowerStub(stub, baseDir) {
|
|
6252
|
-
return stub === "noop" ? stub : { file: (0,
|
|
6311
|
+
return stub === "noop" ? stub : { file: (0, import_node_path20.resolve)(baseDir, stub) };
|
|
6253
6312
|
}
|
|
6254
6313
|
function readPackageJson(dir) {
|
|
6255
|
-
const text2 = readSmallFile((0,
|
|
6314
|
+
const text2 = readSmallFile((0, import_node_path20.join)(dir, "package.json"));
|
|
6256
6315
|
if (!text2) return null;
|
|
6257
6316
|
try {
|
|
6258
6317
|
const parsed = JSON.parse(text2);
|
|
@@ -6264,9 +6323,9 @@ function readPackageJson(dir) {
|
|
|
6264
6323
|
function installedPackageDir(appDir, name2) {
|
|
6265
6324
|
let current = appDir;
|
|
6266
6325
|
while (true) {
|
|
6267
|
-
const dir = (0,
|
|
6268
|
-
if ((0,
|
|
6269
|
-
const parent = (0,
|
|
6326
|
+
const dir = (0, import_node_path20.join)(current, "node_modules", name2);
|
|
6327
|
+
if ((0, import_node_fs20.existsSync)((0, import_node_path20.join)(dir, "package.json"))) return (0, import_node_fs20.realpathSync)(dir);
|
|
6328
|
+
const parent = (0, import_node_path20.dirname)(current);
|
|
6270
6329
|
if (parent === current) return null;
|
|
6271
6330
|
current = parent;
|
|
6272
6331
|
}
|
|
@@ -6321,6 +6380,18 @@ function sourceNativeRequests(file, text2, includeLegacy = false) {
|
|
|
6321
6380
|
LogicalExpression(node) {
|
|
6322
6381
|
if (node.operator === "&&") guard(node.left, node.right);
|
|
6323
6382
|
},
|
|
6383
|
+
VariableDeclarator(node) {
|
|
6384
|
+
if (!includeLegacy || !node.init || nativeLookupName(node.init) !== "NativeModules" || node.id.type !== "ObjectPattern")
|
|
6385
|
+
return;
|
|
6386
|
+
for (const property of node.id.properties) {
|
|
6387
|
+
if (property.type !== "Property") continue;
|
|
6388
|
+
const key = property.key;
|
|
6389
|
+
if (!property.computed && key.type === "Identifier")
|
|
6390
|
+
add("module", key.name, property.start, false);
|
|
6391
|
+
else if (key.type === "Literal" && typeof key.value === "string")
|
|
6392
|
+
add("module", key.value, property.start, false);
|
|
6393
|
+
}
|
|
6394
|
+
},
|
|
6324
6395
|
CallExpression(node) {
|
|
6325
6396
|
const first = node.arguments[0];
|
|
6326
6397
|
if (first?.type !== "Literal" || typeof first.value !== "string") return;
|
|
@@ -6358,7 +6429,7 @@ function mergeRequests(previous, next) {
|
|
|
6358
6429
|
function packageNativeRequests(dir) {
|
|
6359
6430
|
const found = /* @__PURE__ */ new Map();
|
|
6360
6431
|
const directories = scanRepository(dir).directories.filter((sub) => {
|
|
6361
|
-
const segments = (0,
|
|
6432
|
+
const segments = (0, import_node_path20.relative)(dir, sub).split("/");
|
|
6362
6433
|
return !NATIVE_SOURCE_DIRS.has(segments[0]) && !segments.some((segment) => PACKAGE_SKIP_DIRS.has(segment));
|
|
6363
6434
|
});
|
|
6364
6435
|
let files = 0;
|
|
@@ -6366,7 +6437,7 @@ function packageNativeRequests(dir) {
|
|
|
6366
6437
|
for (const name2 of listDir(sub)) {
|
|
6367
6438
|
if (!SOURCE_FILE.test(name2) || name2.endsWith(".d.ts") || files >= 2e3) continue;
|
|
6368
6439
|
files++;
|
|
6369
|
-
const file = (0,
|
|
6440
|
+
const file = (0, import_node_path20.join)(sub, name2);
|
|
6370
6441
|
const text2 = readSmallFile(file);
|
|
6371
6442
|
if (!text2) continue;
|
|
6372
6443
|
for (const { line: _line, ...request } of sourceNativeRequests(file, text2, true)) {
|
|
@@ -6484,27 +6555,27 @@ function wireSlotMigration(appDir, configPath, wire, kept = []) {
|
|
|
6484
6555
|
}
|
|
6485
6556
|
function listDir(dir) {
|
|
6486
6557
|
try {
|
|
6487
|
-
return (0,
|
|
6558
|
+
return (0, import_node_fs20.readdirSync)(dir);
|
|
6488
6559
|
} catch {
|
|
6489
6560
|
return [];
|
|
6490
6561
|
}
|
|
6491
6562
|
}
|
|
6492
6563
|
function readSmallFile(file) {
|
|
6493
6564
|
try {
|
|
6494
|
-
return (0,
|
|
6565
|
+
return (0, import_node_fs20.statSync)(file).size <= 1024 * 1024 ? (0, import_node_fs20.readFileSync)(file, "utf8") : null;
|
|
6495
6566
|
} catch {
|
|
6496
6567
|
return null;
|
|
6497
6568
|
}
|
|
6498
6569
|
}
|
|
6499
6570
|
function hasNativeCode(dir, platform) {
|
|
6500
|
-
const expoConfig = (0,
|
|
6571
|
+
const expoConfig = (0, import_node_path20.join)(dir, "expo-module.config.json");
|
|
6501
6572
|
const platforms = metadataValue(readProjectJson(expoConfig), "platforms");
|
|
6502
6573
|
if (Array.isArray(platforms))
|
|
6503
6574
|
return platforms.includes(platform) || platform === "ios" && platforms.includes("apple");
|
|
6504
|
-
if ([platform, "expo-module.config.json"].some((entry) => (0,
|
|
6575
|
+
if ([platform, "expo-module.config.json"].some((entry) => (0, import_node_fs20.existsSync)((0, import_node_path20.join)(dir, entry))))
|
|
6505
6576
|
return true;
|
|
6506
6577
|
if (listDir(dir).some((name2) => name2.endsWith(".podspec"))) return true;
|
|
6507
|
-
const manifest = readSmallFile((0,
|
|
6578
|
+
const manifest = readSmallFile((0, import_node_path20.join)(dir, "package.json"));
|
|
6508
6579
|
return manifest !== null && manifest.includes('"codegenConfig"');
|
|
6509
6580
|
}
|
|
6510
6581
|
function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__PURE__ */ new Set(), includeLegacy = false, providers) {
|
|
@@ -6517,7 +6588,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6517
6588
|
(excluded) => dir === excluded || dir.startsWith(`${excluded}/`)
|
|
6518
6589
|
))
|
|
6519
6590
|
continue;
|
|
6520
|
-
if ((0,
|
|
6591
|
+
if ((0, import_node_fs20.existsSync)((0, import_node_path20.join)(dir, "expo-module.config.json"))) {
|
|
6521
6592
|
if (platform && !hasNativeCode(dir, platform)) {
|
|
6522
6593
|
excludedModuleDirs.push(dir);
|
|
6523
6594
|
continue;
|
|
@@ -6526,7 +6597,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6526
6597
|
}
|
|
6527
6598
|
for (const name2 of listDir(dir)) {
|
|
6528
6599
|
if (SOURCE_FILE.test(name2) && !name2.endsWith(".d.ts"))
|
|
6529
|
-
sourceFiles.push((0,
|
|
6600
|
+
sourceFiles.push((0, import_node_path20.join)(dir, name2));
|
|
6530
6601
|
}
|
|
6531
6602
|
}
|
|
6532
6603
|
}
|
|
@@ -6536,7 +6607,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6536
6607
|
scanRepository(dir).directories.flatMap(
|
|
6537
6608
|
(sub) => listDir(sub).filter(
|
|
6538
6609
|
(name2) => NATIVE_SOURCE_FILE.test(name2) && (!platform || (platform === "ios" ? name2.endsWith(".swift") : name2.endsWith(".kt")))
|
|
6539
|
-
).map((name2) => (0,
|
|
6610
|
+
).map((name2) => (0, import_node_path20.join)(sub, name2))
|
|
6540
6611
|
)
|
|
6541
6612
|
])
|
|
6542
6613
|
);
|
|
@@ -6545,7 +6616,7 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6545
6616
|
const known = owners.get(dir);
|
|
6546
6617
|
if (known) return known;
|
|
6547
6618
|
const name2 = readPackageJson(dir)?.name;
|
|
6548
|
-
const parent = (0,
|
|
6619
|
+
const parent = (0, import_node_path20.dirname)(dir);
|
|
6549
6620
|
const result = typeof name2 === "string" ? name2 : parent === dir ? pkg.name ?? "app" : owner(parent);
|
|
6550
6621
|
owners.set(dir, result);
|
|
6551
6622
|
return result;
|
|
@@ -6559,15 +6630,15 @@ function scanLocalNative(appDir, pkg, answered, platform, knownPackages = /* @__
|
|
|
6559
6630
|
return;
|
|
6560
6631
|
}
|
|
6561
6632
|
providers ??= dependencyNativeOwners(appDir, pkg);
|
|
6562
|
-
const packageName = providers.get(key) ?? owner((0,
|
|
6633
|
+
const packageName = providers.get(key) ?? owner((0, import_node_path20.dirname)(file));
|
|
6563
6634
|
if (knownPackages.has(packageName)) return;
|
|
6564
6635
|
const moduleDir = expoModuleDirs.find((dir) => file.startsWith(`${dir}/`)) ?? null;
|
|
6565
6636
|
found.set(key, {
|
|
6566
6637
|
kind,
|
|
6567
6638
|
name: name2,
|
|
6568
6639
|
package: packageName,
|
|
6569
|
-
path: `${(0,
|
|
6570
|
-
expoModule: moduleDir ? (0,
|
|
6640
|
+
path: `${(0, import_node_path20.relative)(appDir, file)}:${line}`,
|
|
6641
|
+
expoModule: moduleDir ? (0, import_node_path20.relative)(appDir, moduleDir) || "." : null,
|
|
6571
6642
|
optional,
|
|
6572
6643
|
swift: moduleDir ? (nativeFilesByModule.get(moduleDir) ?? []).some(
|
|
6573
6644
|
(path21) => path21.endsWith(".swift") && [...(readSmallFile(path21) ?? "").matchAll(/\bName\(\s*"(\w+)"\s*\)/g)].some(
|
|
@@ -6618,30 +6689,30 @@ function workspacePackageDirs(appDir, pkg) {
|
|
|
6618
6689
|
for (const name2 of Object.keys({ ...pkg.dependencies, ...pkg.devDependencies })) {
|
|
6619
6690
|
let current = appDir;
|
|
6620
6691
|
while (true) {
|
|
6621
|
-
const link = (0,
|
|
6622
|
-
if ((0,
|
|
6623
|
-
if ((0,
|
|
6624
|
-
const target = (0,
|
|
6692
|
+
const link = (0, import_node_path20.join)(current, "node_modules", name2);
|
|
6693
|
+
if ((0, import_node_fs20.existsSync)(link)) {
|
|
6694
|
+
if ((0, import_node_fs20.lstatSync)(link).isSymbolicLink()) {
|
|
6695
|
+
const target = (0, import_node_fs20.realpathSync)(link);
|
|
6625
6696
|
if (!target.split("/").includes("node_modules") && !target.startsWith(`${appDir}/`)) {
|
|
6626
6697
|
dirs.add(target);
|
|
6627
6698
|
}
|
|
6628
6699
|
}
|
|
6629
6700
|
break;
|
|
6630
6701
|
}
|
|
6631
|
-
const parent = (0,
|
|
6702
|
+
const parent = (0, import_node_path20.dirname)(current);
|
|
6632
6703
|
if (parent === current) break;
|
|
6633
6704
|
current = parent;
|
|
6634
6705
|
}
|
|
6635
6706
|
}
|
|
6636
6707
|
return [...dirs];
|
|
6637
6708
|
}
|
|
6638
|
-
var
|
|
6709
|
+
var import_node_fs20, import_node_path20, import_oxc_parser2, import_sucrase, SOURCE_FILE, NATIVE_LOOKUP, NATIVE_SOURCE_DIRS, PACKAGE_SKIP_DIRS, NATIVE_SOURCE_FILE;
|
|
6639
6710
|
var init_app_stubs = __esm({
|
|
6640
6711
|
"cli/app-stubs.ts"() {
|
|
6641
6712
|
"use strict";
|
|
6642
6713
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6643
|
-
|
|
6644
|
-
|
|
6714
|
+
import_node_fs20 = require("node:fs");
|
|
6715
|
+
import_node_path20 = require("node:path");
|
|
6645
6716
|
init_version_range();
|
|
6646
6717
|
import_oxc_parser2 = require("oxc-parser");
|
|
6647
6718
|
import_sucrase = require("sucrase");
|
|
@@ -6677,12 +6748,12 @@ function resolveFileEntries(entries, configDir) {
|
|
|
6677
6748
|
return Object.fromEntries(
|
|
6678
6749
|
Object.entries(entries).map(([name2, resolution]) => [
|
|
6679
6750
|
name2,
|
|
6680
|
-
resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file:
|
|
6751
|
+
resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string" ? { ...resolution, file: import_node_path21.default.resolve(configDir, resolution.file) } : resolution
|
|
6681
6752
|
])
|
|
6682
6753
|
);
|
|
6683
6754
|
}
|
|
6684
6755
|
function resolveConfigReplacementFiles(config, configPath) {
|
|
6685
|
-
const configDir =
|
|
6756
|
+
const configDir = import_node_path21.default.dirname(configPath);
|
|
6686
6757
|
return {
|
|
6687
6758
|
...config,
|
|
6688
6759
|
modules: resolveFileEntries(config.modules, configDir)
|
|
@@ -6698,7 +6769,7 @@ async function loadRNXAppStubs(project) {
|
|
|
6698
6769
|
return resolveAppStubs(
|
|
6699
6770
|
project.appDir,
|
|
6700
6771
|
config,
|
|
6701
|
-
project.configPath ?
|
|
6772
|
+
project.configPath ? import_node_path21.default.dirname(project.configPath) : project.appDir
|
|
6702
6773
|
);
|
|
6703
6774
|
} catch (error) {
|
|
6704
6775
|
const message = error instanceof Error ? error.message : String(error);
|
|
@@ -6717,7 +6788,7 @@ async function loadConfigFile(project) {
|
|
|
6717
6788
|
[`${rnxPublicBrand.packageName}/config`]: config_exports
|
|
6718
6789
|
}
|
|
6719
6790
|
});
|
|
6720
|
-
const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0,
|
|
6791
|
+
const loaded3 = project.configPath.endsWith(".json") ? JSON.parse((0, import_node_fs21.readFileSync)(project.configPath, "utf8")) : await jiti.import(project.configPath, { default: true });
|
|
6721
6792
|
if (!isPeachConfig(loaded3)) {
|
|
6722
6793
|
throw new Error("the default export must be a peach config object");
|
|
6723
6794
|
}
|
|
@@ -6753,13 +6824,13 @@ async function resolveRNXAppConfig(startDir = process.cwd()) {
|
|
|
6753
6824
|
const project = resolveAppProject(startDir);
|
|
6754
6825
|
return { project, ...await loadRNXAppStubs(project) };
|
|
6755
6826
|
}
|
|
6756
|
-
var
|
|
6827
|
+
var import_node_fs21, import_node_path21, import_jiti, WIRE_SLOTS;
|
|
6757
6828
|
var init_app_config = __esm({
|
|
6758
6829
|
"cli/app-config.ts"() {
|
|
6759
6830
|
"use strict";
|
|
6760
6831
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6761
|
-
|
|
6762
|
-
|
|
6832
|
+
import_node_fs21 = require("node:fs");
|
|
6833
|
+
import_node_path21 = __toESM(require("node:path"), 1);
|
|
6763
6834
|
import_jiti = require("jiti");
|
|
6764
6835
|
init_config();
|
|
6765
6836
|
init_config();
|
|
@@ -6856,14 +6927,14 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
6856
6927
|
const neededPackages = /* @__PURE__ */ new Set();
|
|
6857
6928
|
const factories = [];
|
|
6858
6929
|
const visit3 = (filePath) => {
|
|
6859
|
-
const real =
|
|
6930
|
+
const real = import_node_fs22.default.realpathSync(filePath);
|
|
6860
6931
|
const previous = files.get(real);
|
|
6861
6932
|
if (previous !== void 0) return previous;
|
|
6862
6933
|
const id = "peach-config-file:" + files.size;
|
|
6863
6934
|
files.set(real, id);
|
|
6864
6935
|
const compiled = compileReplacementModule({
|
|
6865
6936
|
filePath: real,
|
|
6866
|
-
source:
|
|
6937
|
+
source: import_node_fs22.default.readFileSync(real, "utf8"),
|
|
6867
6938
|
runtimePackages,
|
|
6868
6939
|
localModuleUrl: (specifier) => visit3(resolveReplacementModuleFile(real, specifier))
|
|
6869
6940
|
});
|
|
@@ -6887,7 +6958,7 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
6887
6958
|
if (!entries || typeof entries !== "object") continue;
|
|
6888
6959
|
for (const resolution of Object.values(entries)) {
|
|
6889
6960
|
if (resolution && typeof resolution === "object" && "file" in resolution && typeof resolution.file === "string") {
|
|
6890
|
-
resolution.file = visit3(
|
|
6961
|
+
resolution.file = visit3(import_node_path22.default.resolve(resolution.file));
|
|
6891
6962
|
}
|
|
6892
6963
|
}
|
|
6893
6964
|
}
|
|
@@ -6911,13 +6982,13 @@ async function produceConfiguredBundle(source, config, runtimePackages) {
|
|
|
6911
6982
|
const identityStart = findBundleFooter(source, "globalThis.__sootsimModulePaths=");
|
|
6912
6983
|
return prefix2 + (identityStart < 0 ? source + footer : source.slice(0, identityStart) + footer + source.slice(identityStart));
|
|
6913
6984
|
}
|
|
6914
|
-
var
|
|
6985
|
+
var import_node_fs22, import_node_path22, import_sucrase2, import_terser;
|
|
6915
6986
|
var init_configured_bundle_producer = __esm({
|
|
6916
6987
|
"src/configured-bundle-producer.ts"() {
|
|
6917
6988
|
"use strict";
|
|
6918
6989
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6919
|
-
|
|
6920
|
-
|
|
6990
|
+
import_node_fs22 = __toESM(require("node:fs"), 1);
|
|
6991
|
+
import_node_path22 = __toESM(require("node:path"), 1);
|
|
6921
6992
|
import_sucrase2 = require("sucrase");
|
|
6922
6993
|
import_terser = require("terser");
|
|
6923
6994
|
init_dependencies();
|
|
@@ -6940,7 +7011,7 @@ module.exports = __toCommonJS(metro_plugin_exports);
|
|
|
6940
7011
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
6941
7012
|
var import_fs4 = __toESM(require("fs"), 1);
|
|
6942
7013
|
var import_module = require("module");
|
|
6943
|
-
var
|
|
7014
|
+
var import_node_crypto5 = require("node:crypto");
|
|
6944
7015
|
var import_path4 = __toESM(require("path"), 1);
|
|
6945
7016
|
init_app_project();
|
|
6946
7017
|
|
|
@@ -7133,13 +7204,13 @@ function readModuleNamespace(moduleRoot, manifest) {
|
|
|
7133
7204
|
function readModuleRootModuleName(moduleRoot) {
|
|
7134
7205
|
const sourceSets = import_node_path3.default.join(moduleRoot, "src");
|
|
7135
7206
|
const manifestFile = import_node_path3.default.join(sourceSets, "main/AndroidManifest.xml");
|
|
7136
|
-
if (!import_node_fs3.default.existsSync(manifestFile)) return
|
|
7207
|
+
if (!import_node_fs3.default.existsSync(manifestFile)) return null;
|
|
7137
7208
|
const document = parseXml(import_node_fs3.default.readFileSync(manifestFile, "utf8"), manifestFile);
|
|
7138
7209
|
const manifest = document.children[0];
|
|
7139
7210
|
const application = manifest?.children.find((child) => child.name === "application");
|
|
7140
|
-
if (manifest?.name !== "manifest" || !application) return
|
|
7211
|
+
if (manifest?.name !== "manifest" || !application) return null;
|
|
7141
7212
|
const launchers = launcherActivities(application);
|
|
7142
|
-
if (launchers.length === 0) return
|
|
7213
|
+
if (launchers.length === 0) return null;
|
|
7143
7214
|
for (const set2 of import_node_fs3.default.readdirSync(sourceSets, { withFileTypes: true })) {
|
|
7144
7215
|
const file = import_node_path3.default.join(sourceSets, set2.name, "AndroidManifest.xml");
|
|
7145
7216
|
if (!set2.isDirectory() || set2.name === "main" || !import_node_fs3.default.existsSync(file)) continue;
|
|
@@ -7171,10 +7242,7 @@ function readModuleRootModuleName(moduleRoot) {
|
|
|
7171
7242
|
function readAndroidLauncherRootModuleName(projectRoot) {
|
|
7172
7243
|
const androidRoot = import_node_path3.default.join(projectRoot, "android");
|
|
7173
7244
|
if (!import_node_fs3.default.existsSync(androidRoot)) return void 0;
|
|
7174
|
-
const names = import_node_fs3.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).
|
|
7175
|
-
const name2 = readModuleRootModuleName(import_node_path3.default.join(androidRoot, entry.name));
|
|
7176
|
-
return name2 === void 0 ? [] : [name2];
|
|
7177
|
-
});
|
|
7245
|
+
const names = import_node_fs3.default.readdirSync(androidRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory()).map((entry) => readModuleRootModuleName(import_node_path3.default.join(androidRoot, entry.name))).filter((name2) => name2 !== null);
|
|
7178
7246
|
return names.length === 1 ? names[0] : void 0;
|
|
7179
7247
|
}
|
|
7180
7248
|
|
|
@@ -7270,6 +7338,7 @@ var import_path = __toESM(require("path"), 1);
|
|
|
7270
7338
|
|
|
7271
7339
|
// ../peach-compat/src/lazy-stub-patterns.ts
|
|
7272
7340
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
7341
|
+
init_version_range();
|
|
7273
7342
|
var LAZY_STUB_PATTERNS = [
|
|
7274
7343
|
"@10play/tentap-editor",
|
|
7275
7344
|
"@adobe/react-native-aepcore",
|
|
@@ -7325,13 +7394,10 @@ var LAZY_STUB_PATTERNS = [
|
|
|
7325
7394
|
"@shopify/checkout-sheet-kit",
|
|
7326
7395
|
"@stream-io/video-react-native-sdk",
|
|
7327
7396
|
"@stripe/stripe-identity-react-native",
|
|
7328
|
-
"@stripe/stripe-react-native",
|
|
7329
|
-
"@stripe/stripe-react-native/lib/typescript/src/types",
|
|
7330
7397
|
"@stripe/stripe-terminal-react-native",
|
|
7331
7398
|
"@supersami/rn-foreground-service",
|
|
7332
7399
|
"@survicate/react-native-survicate",
|
|
7333
7400
|
"@twilio/voice-react-native-sdk",
|
|
7334
|
-
"@walletconnect/react-native-compat",
|
|
7335
7401
|
"@xmartlabs/react-native-line",
|
|
7336
7402
|
"@zoontek/react-native-navigation-bar",
|
|
7337
7403
|
"clevertap-react-native",
|
|
@@ -7343,9 +7409,7 @@ var LAZY_STUB_PATTERNS = [
|
|
|
7343
7409
|
"expo-modules-core",
|
|
7344
7410
|
"expo-superwall",
|
|
7345
7411
|
"freerasp-react-native",
|
|
7346
|
-
"klaviyo-react-native-sdk",
|
|
7347
7412
|
"llama.rn",
|
|
7348
|
-
"mixpanel-react-native",
|
|
7349
7413
|
"newrelic-react-native-agent",
|
|
7350
7414
|
"realm",
|
|
7351
7415
|
"react-native-a11y",
|
|
@@ -7357,7 +7421,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
7357
7421
|
"react-native-android-location-enabler",
|
|
7358
7422
|
"react-native-animateable-text",
|
|
7359
7423
|
"react-native-app-clip",
|
|
7360
|
-
"react-native-appsflyer",
|
|
7361
7424
|
"react-native-avoid-softinput",
|
|
7362
7425
|
"react-native-azure-auth",
|
|
7363
7426
|
"react-native-background-actions",
|
|
@@ -7366,7 +7429,6 @@ var LAZY_STUB_PATTERNS = [
|
|
|
7366
7429
|
"react-native-bluetooth-classic",
|
|
7367
7430
|
"react-native-bluetooth-state-manager",
|
|
7368
7431
|
"react-native-bottom-tabs",
|
|
7369
|
-
"react-native-branch",
|
|
7370
7432
|
"react-native-camera-kit",
|
|
7371
7433
|
"react-native-change-icon",
|
|
7372
7434
|
"react-native-charts-wrapper",
|
|
@@ -8296,7 +8358,6 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
8296
8358
|
"@callstack/timezone-hermes-fix",
|
|
8297
8359
|
"@candlefinance/faster-image",
|
|
8298
8360
|
"@candlefinance/haptics",
|
|
8299
|
-
"@clerk/expo",
|
|
8300
8361
|
"@clerk/expo-passkeys",
|
|
8301
8362
|
"@cometchat/chat-uikit-react-native",
|
|
8302
8363
|
"@computools/react-native-dynamic-app-icon",
|
|
@@ -8332,6 +8393,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
8332
8393
|
"@flyskywhy/react-native-gcanvas",
|
|
8333
8394
|
"@fugood/react-native-audio-pcm-stream",
|
|
8334
8395
|
"@fullstory/react-native",
|
|
8396
|
+
"@g4rb4g3/react-native-carplay",
|
|
8335
8397
|
"@gabriel-sisjr/react-native-background-location",
|
|
8336
8398
|
"@generac/react-native-local-network-permission",
|
|
8337
8399
|
"@giphy/react-native-sdk",
|
|
@@ -8467,6 +8529,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
8467
8529
|
"@rn-org/react-native-geofencing",
|
|
8468
8530
|
"@rn-org/react-native-shortcuts",
|
|
8469
8531
|
"@rnmapbox/maps",
|
|
8532
|
+
"@rntp/player",
|
|
8470
8533
|
"@rnw-community/react-native-payments",
|
|
8471
8534
|
"@rocket.chat/mobile-crypto",
|
|
8472
8535
|
"@roman.sytnyk/blur-app-in-recents",
|
|
@@ -8944,6 +9007,7 @@ var NATIVE_STUB_PACKAGE_NAMES = [
|
|
|
8944
9007
|
"react-native-nfc-manager",
|
|
8945
9008
|
"react-native-nitro-ark",
|
|
8946
9009
|
"react-native-nitro-audio-manager",
|
|
9010
|
+
"react-native-nitro-base64",
|
|
8947
9011
|
"react-native-nitro-buffer",
|
|
8948
9012
|
"react-native-nitro-cloud-uploader",
|
|
8949
9013
|
"react-native-nitro-cookies",
|
|
@@ -9248,7 +9312,7 @@ var NATIVE_RUNTIME_PACKAGE_NAMES = [
|
|
|
9248
9312
|
"@valora/react-native-keychain",
|
|
9249
9313
|
"react-native-app-control",
|
|
9250
9314
|
"react-native-blue-crypto",
|
|
9251
|
-
"react-native-
|
|
9315
|
+
"react-native-dynamic-theme",
|
|
9252
9316
|
"react-native-nitro-gzip",
|
|
9253
9317
|
"react-native-sectioned-slider"
|
|
9254
9318
|
];
|
|
@@ -9511,6 +9575,10 @@ var SOOTSIM_COMPAT_WRAPPER_REAL_PACKAGES = {
|
|
|
9511
9575
|
specifier: "@peach-internal/expo-platform",
|
|
9512
9576
|
packageName: "expo-modules-core/build/Platform.js"
|
|
9513
9577
|
},
|
|
9578
|
+
expoLegacyEventEmitter: {
|
|
9579
|
+
specifier: "@peach-internal/expo-legacy-event-emitter",
|
|
9580
|
+
packageName: "expo-modules-core/build/LegacyEventEmitter.js"
|
|
9581
|
+
},
|
|
9514
9582
|
expoSharedObjectHook: {
|
|
9515
9583
|
specifier: "@peach-internal/expo-shared-object-hook",
|
|
9516
9584
|
packageName: "expo-modules-core/build/hooks/useReleasingSharedObject.js"
|
|
@@ -11848,6 +11916,13 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
11848
11916
|
...max === void 0 ? {} : { maxSdkVersion: Number(max) }
|
|
11849
11917
|
});
|
|
11850
11918
|
}
|
|
11919
|
+
let androidPhotoLibraryAddOnly;
|
|
11920
|
+
for (const element of application.children) {
|
|
11921
|
+
if (element.name !== "meta-data" || element.attributes[`${attribute}name`] !== "one.photoLibrary.addOnly")
|
|
11922
|
+
continue;
|
|
11923
|
+
if (/^(?:true|True|TRUE)$/.test(element.attributes[`${attribute}value`]?.trim() ?? ""))
|
|
11924
|
+
androidPhotoLibraryAddOnly = true;
|
|
11925
|
+
}
|
|
11851
11926
|
let label = application.attributes[`${attribute}label`];
|
|
11852
11927
|
let applicationName = null;
|
|
11853
11928
|
if (label && !/\$\{|^[@?]/.test(label)) applicationName = label;
|
|
@@ -11886,7 +11961,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
11886
11961
|
buildVersion,
|
|
11887
11962
|
bundleIdentifier,
|
|
11888
11963
|
platform: "android",
|
|
11889
|
-
androidManifestPermissions
|
|
11964
|
+
androidManifestPermissions,
|
|
11965
|
+
...androidPhotoLibraryAddOnly === void 0 ? {} : { androidPhotoLibraryAddOnly }
|
|
11890
11966
|
};
|
|
11891
11967
|
}
|
|
11892
11968
|
function androidMergedResourceValuesDirectory(manifestFile) {
|
|
@@ -12079,7 +12155,7 @@ function parseOpenStepPlist(text2) {
|
|
|
12079
12155
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12080
12156
|
var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
|
|
12081
12157
|
var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
|
|
12082
|
-
function xcodePathResolver(objects, projectDir,
|
|
12158
|
+
function xcodePathResolver(objects, projectDir, join7) {
|
|
12083
12159
|
const parents = /* @__PURE__ */ new Map();
|
|
12084
12160
|
for (const [id, entry] of Object.entries(objects)) {
|
|
12085
12161
|
if (!isDict(entry)) continue;
|
|
@@ -12097,11 +12173,11 @@ function xcodePathResolver(objects, projectDir, join6) {
|
|
|
12097
12173
|
const own = str(entry.path) ?? "";
|
|
12098
12174
|
const tree = str(entry.sourceTree) ?? "<group>";
|
|
12099
12175
|
if (tree === "<absolute>") result = own;
|
|
12100
|
-
else if (tree === "SOURCE_ROOT") result =
|
|
12176
|
+
else if (tree === "SOURCE_ROOT") result = join7(projectDir, own);
|
|
12101
12177
|
else if (tree === "<group>") {
|
|
12102
12178
|
const parent = parents.get(id);
|
|
12103
12179
|
const base = parent ? resolve4(parent) : projectDir;
|
|
12104
|
-
if (base !== null) result =
|
|
12180
|
+
if (base !== null) result = join7(base, own);
|
|
12105
12181
|
}
|
|
12106
12182
|
}
|
|
12107
12183
|
paths.set(id, result);
|
|
@@ -12109,7 +12185,7 @@ function xcodePathResolver(objects, projectDir, join6) {
|
|
|
12109
12185
|
};
|
|
12110
12186
|
return resolve4;
|
|
12111
12187
|
}
|
|
12112
|
-
function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder,
|
|
12188
|
+
function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join7, visit3) {
|
|
12113
12189
|
const target = objects[targetId];
|
|
12114
12190
|
if (!isDict(target)) return;
|
|
12115
12191
|
for (const phaseId of list(target.buildPhases)) {
|
|
@@ -12145,7 +12221,7 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
|
|
|
12145
12221
|
for (const relative3 of list(exception.membershipExceptions))
|
|
12146
12222
|
exceptions.add(relative3);
|
|
12147
12223
|
}
|
|
12148
|
-
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(
|
|
12224
|
+
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative3) => filesUnder(join7(folder, relative3)));
|
|
12149
12225
|
for (const file of members) {
|
|
12150
12226
|
const relative3 = file.slice(prefix2.length);
|
|
12151
12227
|
const excepted = [...exceptions].some(
|
|
@@ -12542,7 +12618,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
12542
12618
|
if (resourceUri) {
|
|
12543
12619
|
if (!selectedTarget)
|
|
12544
12620
|
throw new Error("native app icon target membership is unresolved");
|
|
12545
|
-
const
|
|
12621
|
+
const join7 = (base, own) => {
|
|
12546
12622
|
const segments = [];
|
|
12547
12623
|
for (const segment of `${base}/${own}`.split("/")) {
|
|
12548
12624
|
if (segment === "" || segment === ".") continue;
|
|
@@ -12555,7 +12631,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
12555
12631
|
const project = Object.values(objects).find(
|
|
12556
12632
|
(object2) => isRecord(object2) && object2.isa === "PBXProject"
|
|
12557
12633
|
);
|
|
12558
|
-
const projectDir =
|
|
12634
|
+
const projectDir = join7(
|
|
12559
12635
|
pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
|
|
12560
12636
|
isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
|
|
12561
12637
|
);
|
|
@@ -12563,7 +12639,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
12563
12639
|
visitXcodeTargetMembers(
|
|
12564
12640
|
objects,
|
|
12565
12641
|
selectedTarget.id,
|
|
12566
|
-
xcodePathResolver(objects, projectDir,
|
|
12642
|
+
xcodePathResolver(objects, projectDir, join7),
|
|
12567
12643
|
(file) => {
|
|
12568
12644
|
if (Object.hasOwn(files, file)) return [file];
|
|
12569
12645
|
const prefix2 = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
@@ -12571,7 +12647,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
12571
12647
|
(path21) => path21.startsWith(prefix2) && !/(?:^|\/)\./.test(path21.slice(prefix2.length))
|
|
12572
12648
|
);
|
|
12573
12649
|
},
|
|
12574
|
-
|
|
12650
|
+
join7,
|
|
12575
12651
|
(file, kind) => {
|
|
12576
12652
|
if (kind === "resource") resources.add(file);
|
|
12577
12653
|
}
|
|
@@ -12665,26 +12741,221 @@ function extractNativeAppIdentityFromFiles(files, platform, parseInfoPlist, iosT
|
|
|
12665
12741
|
|
|
12666
12742
|
// src/native-app-identity-project.ts
|
|
12667
12743
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12668
|
-
var
|
|
12744
|
+
var import_node_fs14 = __toESM(require("node:fs"), 1);
|
|
12669
12745
|
var import_node_module3 = require("node:module");
|
|
12670
|
-
var
|
|
12746
|
+
var import_node_path15 = __toESM(require("node:path"), 1);
|
|
12671
12747
|
init_is_record();
|
|
12672
12748
|
|
|
12673
12749
|
// src/xcode-project.ts
|
|
12674
12750
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12675
12751
|
var import_node_child_process3 = require("node:child_process");
|
|
12676
|
-
var
|
|
12677
|
-
var
|
|
12678
|
-
var
|
|
12752
|
+
var import_node_crypto4 = require("node:crypto");
|
|
12753
|
+
var import_node_fs13 = __toESM(require("node:fs"), 1);
|
|
12754
|
+
var import_node_path14 = __toESM(require("node:path"), 1);
|
|
12679
12755
|
var import_plist3 = __toESM(require("plist"), 1);
|
|
12680
12756
|
|
|
12681
12757
|
// src/swift-coverage/xcode-assets.ts
|
|
12682
12758
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12687
|
-
|
|
12759
|
+
|
|
12760
|
+
// src/swift-coverage/provenance.ts
|
|
12761
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12762
|
+
var import_node_crypto3 = require("node:crypto");
|
|
12763
|
+
var import_node_fs10 = require("node:fs");
|
|
12764
|
+
var import_node_path10 = require("node:path");
|
|
12765
|
+
var SWIFT_COVERAGE_DIGEST_SOURCES = [
|
|
12766
|
+
"swift-coverage/indexdump.ts",
|
|
12767
|
+
"swift-coverage/indexing.ts",
|
|
12768
|
+
"swift-coverage/types.ts",
|
|
12769
|
+
"swift-coverage/source.ts",
|
|
12770
|
+
"swift-coverage/package.ts",
|
|
12771
|
+
"swift-coverage/xcode.ts",
|
|
12772
|
+
"swift-coverage/xcode-assets.ts",
|
|
12773
|
+
"swift-coverage/xcode-asset-symbols.ts",
|
|
12774
|
+
"swift-coverage/xcode-bridging.ts",
|
|
12775
|
+
"swift-coverage/xcode-packages.ts",
|
|
12776
|
+
"swift-coverage/xcode-strings.ts",
|
|
12777
|
+
"swift-coverage/reader.ts",
|
|
12778
|
+
"swift-coverage/provenance.ts",
|
|
12779
|
+
"swift-package-manifest.ts",
|
|
12780
|
+
"swift-package.ts",
|
|
12781
|
+
"swift-source-file.ts",
|
|
12782
|
+
"swift-toolchain.ts",
|
|
12783
|
+
"home-paths.ts",
|
|
12784
|
+
"xcode-header-search.ts",
|
|
12785
|
+
"xcode-project.ts",
|
|
12786
|
+
"xcode-target-members.ts",
|
|
12787
|
+
"xcode-json-project.ts",
|
|
12788
|
+
"openstep-plist.ts"
|
|
12789
|
+
];
|
|
12790
|
+
function swiftCoverageSourceDigests(srcDir) {
|
|
12791
|
+
return Object.fromEntries(
|
|
12792
|
+
SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
|
|
12793
|
+
file,
|
|
12794
|
+
(0, import_node_crypto3.createHash)("sha256").update((0, import_node_fs10.readFileSync)((0, import_node_path10.join)(srcDir, file))).digest("hex")
|
|
12795
|
+
])
|
|
12796
|
+
);
|
|
12797
|
+
}
|
|
12798
|
+
var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests((0, import_node_path10.join)(__sootsim_import_meta_dirname, ".."));
|
|
12799
|
+
|
|
12800
|
+
// src/swift-coverage/xcode-asset-symbols.ts
|
|
12801
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12802
|
+
var silentTypes = /* @__PURE__ */ new Set([
|
|
12803
|
+
"appiconset",
|
|
12804
|
+
"brandassets",
|
|
12805
|
+
"dataset",
|
|
12806
|
+
"iconset",
|
|
12807
|
+
"iconstack",
|
|
12808
|
+
"iconstackgroup",
|
|
12809
|
+
"launchimage",
|
|
12810
|
+
"stickerpack",
|
|
12811
|
+
"stickersiconset",
|
|
12812
|
+
"textureset"
|
|
12813
|
+
]);
|
|
12814
|
+
var stackTypes = /* @__PURE__ */ new Set(["imagestack", "solidimagestack"]);
|
|
12815
|
+
var unprovenTypes = /* @__PURE__ */ new Set([
|
|
12816
|
+
"arobject",
|
|
12817
|
+
"arreferenceimage",
|
|
12818
|
+
"arresourcegroup",
|
|
12819
|
+
"complicationset",
|
|
12820
|
+
"cubetextureset",
|
|
12821
|
+
"gcdashboardimage",
|
|
12822
|
+
"gcleaderboard",
|
|
12823
|
+
"gcleaderboardset",
|
|
12824
|
+
"glyphset",
|
|
12825
|
+
"iconbadgeset",
|
|
12826
|
+
"iconstacklayer",
|
|
12827
|
+
"imagestacklayer",
|
|
12828
|
+
"mipmapset",
|
|
12829
|
+
"modelset",
|
|
12830
|
+
"sidebariconset",
|
|
12831
|
+
"solidimagestacklayer",
|
|
12832
|
+
"sticker",
|
|
12833
|
+
"stickerframeset",
|
|
12834
|
+
"stickersequence"
|
|
12835
|
+
]);
|
|
12836
|
+
var knownTypes = /* @__PURE__ */ new Set([
|
|
12837
|
+
"colorset",
|
|
12838
|
+
"imageset",
|
|
12839
|
+
"symbolset",
|
|
12840
|
+
"spriteatlas",
|
|
12841
|
+
...silentTypes,
|
|
12842
|
+
...stackTypes,
|
|
12843
|
+
...unprovenTypes
|
|
12844
|
+
]);
|
|
12845
|
+
var compressionTypes = [
|
|
12846
|
+
"automatic",
|
|
12847
|
+
"lossless",
|
|
12848
|
+
"lossy",
|
|
12849
|
+
"gpu-optimized-best",
|
|
12850
|
+
"gpu-optimized-smallest"
|
|
12851
|
+
];
|
|
12852
|
+
var renditionRules = {
|
|
12853
|
+
appearances: "objects",
|
|
12854
|
+
locale: "string",
|
|
12855
|
+
platform: "string",
|
|
12856
|
+
resizing: "object",
|
|
12857
|
+
"alignment-insets": "object",
|
|
12858
|
+
"compression-type": compressionTypes,
|
|
12859
|
+
"display-gamut": ["sRGB", "display-P3"],
|
|
12860
|
+
"minimum-system-version": "string",
|
|
12861
|
+
"matching-style": "string",
|
|
12862
|
+
"template-rendering-intent": "string",
|
|
12863
|
+
size: "string",
|
|
12864
|
+
role: "string",
|
|
12865
|
+
orientation: "string",
|
|
12866
|
+
extent: "string"
|
|
12867
|
+
};
|
|
12868
|
+
var setRules = {
|
|
12869
|
+
localizable: "any",
|
|
12870
|
+
"auto-scaling": "string",
|
|
12871
|
+
"symbol-rendering-intent": "string",
|
|
12872
|
+
"provides-namespace": "any",
|
|
12873
|
+
"on-demand-resource-tags": "any",
|
|
12874
|
+
"template-rendering-intent": "string",
|
|
12875
|
+
"preserves-vector-representation": "any"
|
|
12876
|
+
};
|
|
12877
|
+
var inclusionRules = {
|
|
12878
|
+
idiom: "any",
|
|
12879
|
+
subtype: "any",
|
|
12880
|
+
unassigned: "any"
|
|
12881
|
+
};
|
|
12882
|
+
var rules = {
|
|
12883
|
+
// colors check none of the image traits
|
|
12884
|
+
colorset: {
|
|
12885
|
+
entry: {
|
|
12886
|
+
...renditionRules,
|
|
12887
|
+
...inclusionRules,
|
|
12888
|
+
color: "any",
|
|
12889
|
+
scale: "string",
|
|
12890
|
+
"language-direction": "string",
|
|
12891
|
+
"width-class": "string",
|
|
12892
|
+
"height-class": "string",
|
|
12893
|
+
memory: "string",
|
|
12894
|
+
"graphics-feature-set": "string",
|
|
12895
|
+
"screen-width": "string"
|
|
12896
|
+
},
|
|
12897
|
+
set: setRules
|
|
12898
|
+
},
|
|
12899
|
+
imageset: {
|
|
12900
|
+
entry: {
|
|
12901
|
+
...renditionRules,
|
|
12902
|
+
...inclusionRules,
|
|
12903
|
+
filename: "any",
|
|
12904
|
+
scale: ["1x", "2x", "3x"],
|
|
12905
|
+
"language-direction": ["left-to-right", "right-to-left"],
|
|
12906
|
+
"width-class": ["compact", "regular", "unspecified"],
|
|
12907
|
+
"height-class": ["compact", "regular"],
|
|
12908
|
+
memory: ["1GB", "2GB", "3GB", "4GB", "6GB", "8GB", "12GB", "16GB"],
|
|
12909
|
+
"graphics-feature-set": [
|
|
12910
|
+
...Array.from({ length: 10 }, (_, i) => `apple${i + 1}`),
|
|
12911
|
+
"metal1v2",
|
|
12912
|
+
"metal2v2",
|
|
12913
|
+
"metal3v1",
|
|
12914
|
+
"metal3v2",
|
|
12915
|
+
"metal4v1"
|
|
12916
|
+
],
|
|
12917
|
+
"screen-width": "string"
|
|
12918
|
+
},
|
|
12919
|
+
// an image whose vector flag is not a boolean is dropped
|
|
12920
|
+
set: {
|
|
12921
|
+
...setRules,
|
|
12922
|
+
"preserves-vector-representation": "boolean",
|
|
12923
|
+
"compression-type": compressionTypes
|
|
12924
|
+
}
|
|
12925
|
+
},
|
|
12926
|
+
symbolset: {
|
|
12927
|
+
entry: { idiom: "any", filename: "any" },
|
|
12928
|
+
set: { "symbol-rendering-intent": "any" }
|
|
12929
|
+
}
|
|
12930
|
+
};
|
|
12931
|
+
var swiftKeywords = new Set(
|
|
12932
|
+
"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(
|
|
12933
|
+
" "
|
|
12934
|
+
)
|
|
12935
|
+
);
|
|
12936
|
+
var nsColorConflicts = new Set(
|
|
12937
|
+
"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(
|
|
12938
|
+
" "
|
|
12939
|
+
)
|
|
12940
|
+
);
|
|
12941
|
+
var uiColorConflicts = new Set(
|
|
12942
|
+
"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(
|
|
12943
|
+
" "
|
|
12944
|
+
)
|
|
12945
|
+
);
|
|
12946
|
+
var colorConflicts = new Set(
|
|
12947
|
+
"transferRepresentation accentColor secondary primary orange purple indigo yellow white black green brown clear blue pink teal cyan mint gray red".split(
|
|
12948
|
+
" "
|
|
12949
|
+
)
|
|
12950
|
+
);
|
|
12951
|
+
var nsImageConflicts = new Set(
|
|
12952
|
+
"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(
|
|
12953
|
+
" "
|
|
12954
|
+
)
|
|
12955
|
+
);
|
|
12956
|
+
|
|
12957
|
+
// src/swift-coverage/xcode-assets.ts
|
|
12958
|
+
var unprovenAssetSettings = [
|
|
12688
12959
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
|
|
12689
12960
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
|
|
12690
12961
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_ERRORS",
|
|
@@ -12693,10 +12964,16 @@ var assetSymbolSettingKeys = [
|
|
|
12693
12964
|
"ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH",
|
|
12694
12965
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_INDEX_PATH",
|
|
12695
12966
|
"ASSETCATALOG_COMPILER_BUNDLE_IDENTIFIER",
|
|
12696
|
-
"ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
|
|
12967
|
+
"ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
|
|
12968
|
+
];
|
|
12969
|
+
var assetSymbolSettingKeys = [
|
|
12970
|
+
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
|
|
12971
|
+
"ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
|
|
12972
|
+
"PRODUCT_BUNDLE_IDENTIFIER",
|
|
12973
|
+
"TARGETED_DEVICE_FAMILY",
|
|
12974
|
+
...unprovenAssetSettings,
|
|
12697
12975
|
"ASSETCATALOG_OTHER_FLAGS"
|
|
12698
12976
|
];
|
|
12699
|
-
var unprovenAssetSettings = assetSymbolSettingKeys.slice(4).filter((key) => key !== "ASSETCATALOG_OTHER_FLAGS");
|
|
12700
12977
|
|
|
12701
12978
|
// src/swift-package.ts
|
|
12702
12979
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -12744,19 +13021,19 @@ function swiftPackageIdentity(url) {
|
|
|
12744
13021
|
// src/swift-package-manifest.ts
|
|
12745
13022
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12746
13023
|
var import_node_child_process2 = require("node:child_process");
|
|
12747
|
-
var
|
|
13024
|
+
var import_node_fs12 = __toESM(require("node:fs"), 1);
|
|
12748
13025
|
var import_node_os4 = __toESM(require("node:os"), 1);
|
|
12749
|
-
var
|
|
13026
|
+
var import_node_path12 = __toESM(require("node:path"), 1);
|
|
12750
13027
|
init_home_paths();
|
|
12751
13028
|
|
|
12752
13029
|
// src/swift-distribution.lock.json
|
|
12753
13030
|
var swift_distribution_lock_default = {
|
|
12754
|
-
id: "
|
|
12755
|
-
release: "swift-6.4.0-RELEASE-custom-
|
|
13031
|
+
id: "95a0e12e7c0af807",
|
|
13032
|
+
release: "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66",
|
|
12756
13033
|
wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-cbf01f4b",
|
|
12757
13034
|
wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-cbf01f4b.artifactbundle.tar.gz",
|
|
12758
13035
|
wasmSdkChecksum: "2243db65b12743d577fecc6aa27761363ccef470202f1fef2582e58750c0da4f",
|
|
12759
|
-
source: "
|
|
13036
|
+
source: "56ee2df2c863050b8261f4f20f6a51c008682ce9",
|
|
12760
13037
|
targets: [
|
|
12761
13038
|
"ImagePlayground",
|
|
12762
13039
|
"QuickLookThumbnailing",
|
|
@@ -12796,6 +13073,7 @@ var swift_distribution_lock_default = {
|
|
|
12796
13073
|
"PeachFoundation",
|
|
12797
13074
|
"FoundationNetworking",
|
|
12798
13075
|
"DeveloperToolsSupport",
|
|
13076
|
+
"CoreImageEnums",
|
|
12799
13077
|
"SwiftUI",
|
|
12800
13078
|
"DarwinRecords",
|
|
12801
13079
|
"Darwin",
|
|
@@ -12927,11 +13205,12 @@ var swift_distribution_lock_default = {
|
|
|
12927
13205
|
],
|
|
12928
13206
|
systemEnvironment: {
|
|
12929
13207
|
scenePhase: ["string:active", "string:inactive", "string:background"],
|
|
12930
|
-
colorScheme: ["string:light", "string:dark"],
|
|
12931
|
-
semanticColors: ["object"],
|
|
12932
13208
|
deviceModel: ["string"],
|
|
12933
13209
|
systemName: ["string"],
|
|
12934
13210
|
systemVersion: ["string"],
|
|
13211
|
+
colorScheme: ["string:light", "string:dark"],
|
|
13212
|
+
semanticColors: ["object"],
|
|
13213
|
+
imageAssets: ["object"],
|
|
12935
13214
|
locale: ["string"],
|
|
12936
13215
|
dynamicTypeSize: [
|
|
12937
13216
|
"string:xSmall",
|
|
@@ -12947,51 +13226,88 @@ var swift_distribution_lock_default = {
|
|
|
12947
13226
|
"string:accessibility4",
|
|
12948
13227
|
"string:accessibility5"
|
|
12949
13228
|
],
|
|
12950
|
-
accessibilityReduceMotion: ["bool"],
|
|
12951
13229
|
horizontalSizeClass: ["string:compact", "string:regular"],
|
|
12952
13230
|
verticalSizeClass: ["string:compact", "string:regular"],
|
|
12953
|
-
|
|
13231
|
+
accessibilityReduceMotion: ["bool"]
|
|
12954
13232
|
},
|
|
12955
13233
|
hosts: {
|
|
12956
13234
|
"darwin-arm64": {
|
|
12957
|
-
sha256: "
|
|
12958
|
-
size:
|
|
13235
|
+
sha256: "2ab6cf8ee1a10b76ef46c90c8ee384f44594aa5be63ac267f55ab6cd30722595",
|
|
13236
|
+
size: 88639020
|
|
12959
13237
|
},
|
|
12960
13238
|
"linux-x64": {
|
|
12961
|
-
sha256: "
|
|
12962
|
-
size:
|
|
13239
|
+
sha256: "e159994e38c6043515c97d818c63f1e1b0170fb73b2cb721a6913b21691b1ec7",
|
|
13240
|
+
size: 91386228
|
|
12963
13241
|
},
|
|
12964
13242
|
"linux-arm64": {
|
|
12965
|
-
sha256: "
|
|
12966
|
-
size:
|
|
13243
|
+
sha256: "80ef20a79414516631bc1394c1fcd045d0381a3c8be8b65967d6a089ad768d23",
|
|
13244
|
+
size: 90878300
|
|
12967
13245
|
}
|
|
12968
13246
|
}
|
|
12969
13247
|
};
|
|
12970
13248
|
|
|
12971
13249
|
// src/swift-toolchain.ts
|
|
12972
13250
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
12973
|
-
var
|
|
13251
|
+
var import_node_fs11 = __toESM(require("node:fs"), 1);
|
|
12974
13252
|
var import_node_os3 = __toESM(require("node:os"), 1);
|
|
12975
|
-
var
|
|
13253
|
+
var import_node_path11 = __toESM(require("node:path"), 1);
|
|
13254
|
+
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66";
|
|
13255
|
+
var SWIFT_HOST_COMPILER_ID = "0b2d0a9011c88e66";
|
|
13256
|
+
var compilerArchives = {
|
|
13257
|
+
"swift-6.4.0-RELEASE-custom-ecd2ad9d3fe59329": {
|
|
13258
|
+
identity: "ecd2ad9d3fe59329",
|
|
13259
|
+
hosts: {
|
|
13260
|
+
"darwin-arm64": {
|
|
13261
|
+
checksum: "ab42a13b34e410ca09737420d1ee1d6af417eec039ab44f9a60502bdb5c76506",
|
|
13262
|
+
manifest: "8a93b6b1e6ff577f6dacd81a511d415ca3b396698f9b0c4abc35a4ca807e9d1a"
|
|
13263
|
+
},
|
|
13264
|
+
"linux-x64": {
|
|
13265
|
+
checksum: "b174baa2c578fb32f09c79590d65d03951b04cdec52101b23a46c0b274249fc3",
|
|
13266
|
+
manifest: "330e6cbae5890111c22a58e645049a971eff30334c3f240c650fcfedfeab4ef6"
|
|
13267
|
+
},
|
|
13268
|
+
"linux-arm64": {
|
|
13269
|
+
checksum: "25f722334dd9d79391cb2e47301165e9ef98dd9a8036927652f3c5db3c56b2ae",
|
|
13270
|
+
manifest: "94e5667febf26f8a4ee8c5456f83f62d17453e503d261a4c46d2b80f872470ab"
|
|
13271
|
+
}
|
|
13272
|
+
}
|
|
13273
|
+
},
|
|
13274
|
+
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
13275
|
+
identity: SWIFT_HOST_COMPILER_ID,
|
|
13276
|
+
hosts: {
|
|
13277
|
+
"darwin-arm64": {
|
|
13278
|
+
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
13279
|
+
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
13280
|
+
},
|
|
13281
|
+
"linux-x64": {
|
|
13282
|
+
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
13283
|
+
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
13284
|
+
},
|
|
13285
|
+
"linux-arm64": {
|
|
13286
|
+
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
13287
|
+
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
13288
|
+
}
|
|
13289
|
+
}
|
|
13290
|
+
}
|
|
13291
|
+
};
|
|
12976
13292
|
function swiftToolchainBin(release) {
|
|
12977
13293
|
if (process.platform === "darwin") {
|
|
12978
13294
|
const dirs = [import_node_os3.default.homedir(), "/"].map(
|
|
12979
|
-
(base) =>
|
|
13295
|
+
(base) => import_node_path11.default.join(base, `Library/Developer/Toolchains/${release}.xctoolchain/usr/bin`)
|
|
12980
13296
|
);
|
|
12981
|
-
return dirs.find((dir) =>
|
|
13297
|
+
return dirs.find((dir) => import_node_fs11.default.existsSync(import_node_path11.default.join(dir, "swift"))) ?? dirs[0];
|
|
12982
13298
|
}
|
|
12983
13299
|
if (process.env.CONTRAST_SWIFT_TOOLCHAINS) {
|
|
12984
|
-
return
|
|
13300
|
+
return import_node_path11.default.join(process.env.CONTRAST_SWIFT_TOOLCHAINS, release, "usr/bin");
|
|
12985
13301
|
}
|
|
12986
|
-
const image =
|
|
12987
|
-
if (
|
|
13302
|
+
const image = import_node_path11.default.join("/opt/swift", release, "usr/bin");
|
|
13303
|
+
if (import_node_fs11.default.existsSync(import_node_path11.default.join(image, "swift"))) return image;
|
|
12988
13304
|
if (release.includes("-custom-"))
|
|
12989
|
-
return
|
|
12990
|
-
return (process.env.PATH ?? "").split(
|
|
13305
|
+
return import_node_path11.default.join(peachHome(), "swift", "toolchains", release, "usr/bin");
|
|
13306
|
+
return (process.env.PATH ?? "").split(import_node_path11.default.delimiter).find((dir) => dir && import_node_fs11.default.existsSync(import_node_path11.default.join(dir, "swift"))) ?? image;
|
|
12991
13307
|
}
|
|
12992
13308
|
function peachHome() {
|
|
12993
13309
|
const override = process.env.PEACH_HOME;
|
|
12994
|
-
return override ?
|
|
13310
|
+
return override ? import_node_path11.default.resolve(override) : import_node_path11.default.join(import_node_os3.default.homedir(), ".peach");
|
|
12995
13311
|
}
|
|
12996
13312
|
var scratch;
|
|
12997
13313
|
function swiftEnvironment(base = process.env) {
|
|
@@ -12999,18 +13315,23 @@ function swiftEnvironment(base = process.env) {
|
|
|
12999
13315
|
return {
|
|
13000
13316
|
...base,
|
|
13001
13317
|
TMPDIR: scratch.directory,
|
|
13002
|
-
XDG_CONFIG_HOME:
|
|
13003
|
-
XDG_CACHE_HOME:
|
|
13004
|
-
XDG_DATA_HOME:
|
|
13318
|
+
XDG_CONFIG_HOME: import_node_path11.default.join(scratch.home, ".config"),
|
|
13319
|
+
XDG_CACHE_HOME: import_node_path11.default.join(scratch.home, ".cache"),
|
|
13320
|
+
XDG_DATA_HOME: import_node_path11.default.join(scratch.home, ".local", "share"),
|
|
13005
13321
|
...process.platform === "linux" ? { HOME: scratch.home } : {}
|
|
13006
13322
|
};
|
|
13007
13323
|
}
|
|
13008
13324
|
|
|
13009
13325
|
// src/swift-package-manifest.ts
|
|
13010
13326
|
function swiftCommand() {
|
|
13011
|
-
return
|
|
13327
|
+
return import_node_path12.default.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
|
|
13012
13328
|
}
|
|
13013
|
-
|
|
13329
|
+
function swiftPackageFailure(error) {
|
|
13330
|
+
if (!(error instanceof Error)) return String(error);
|
|
13331
|
+
const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
|
|
13332
|
+
return stderr || error.message;
|
|
13333
|
+
}
|
|
13334
|
+
var cacheDir2 = import_node_path12.default.join(cacheDir(), "swift-manifests");
|
|
13014
13335
|
var requirementClause = (item) => {
|
|
13015
13336
|
const url = JSON.stringify(item.url);
|
|
13016
13337
|
const requirement = item.requirement;
|
|
@@ -13050,9 +13371,9 @@ let package = Package(
|
|
|
13050
13371
|
]
|
|
13051
13372
|
)
|
|
13052
13373
|
`;
|
|
13053
|
-
const dir =
|
|
13374
|
+
const dir = import_node_fs12.default.mkdtempSync(import_node_path12.default.join(import_node_os4.default.tmpdir(), "peach-resolve-"));
|
|
13054
13375
|
try {
|
|
13055
|
-
|
|
13376
|
+
import_node_fs12.default.writeFileSync(import_node_path12.default.join(dir, "Package.swift"), manifest);
|
|
13056
13377
|
try {
|
|
13057
13378
|
(0, import_node_child_process2.execFileSync)(
|
|
13058
13379
|
swiftCommand(),
|
|
@@ -13062,7 +13383,7 @@ let package = Package(
|
|
|
13062
13383
|
"--package-path",
|
|
13063
13384
|
dir,
|
|
13064
13385
|
"--scratch-path",
|
|
13065
|
-
|
|
13386
|
+
import_node_path12.default.join(dir, ".build"),
|
|
13066
13387
|
"resolve"
|
|
13067
13388
|
],
|
|
13068
13389
|
{
|
|
@@ -13073,24 +13394,24 @@ let package = Package(
|
|
|
13073
13394
|
}
|
|
13074
13395
|
);
|
|
13075
13396
|
} catch (error) {
|
|
13076
|
-
const stderr = error instanceof Error && "stderr" in error ? String(error.stderr).trim() : "";
|
|
13077
13397
|
throw new Error(
|
|
13078
|
-
`swiftpm could not resolve ${clauses.length} package requirements${
|
|
13398
|
+
`swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
|
|
13399
|
+
{ cause: error }
|
|
13079
13400
|
);
|
|
13080
13401
|
}
|
|
13081
|
-
const resolved =
|
|
13082
|
-
if (!
|
|
13402
|
+
const resolved = import_node_path12.default.join(dir, "Package.resolved");
|
|
13403
|
+
if (!import_node_fs12.default.existsSync(resolved))
|
|
13083
13404
|
throw new Error("swift package resolve wrote no Package.resolved");
|
|
13084
|
-
|
|
13085
|
-
|
|
13405
|
+
import_node_fs12.default.mkdirSync(import_node_path12.default.dirname(destination), { recursive: true });
|
|
13406
|
+
import_node_fs12.default.copyFileSync(resolved, destination);
|
|
13086
13407
|
} finally {
|
|
13087
|
-
|
|
13408
|
+
import_node_fs12.default.rmSync(dir, { recursive: true, force: true });
|
|
13088
13409
|
}
|
|
13089
13410
|
}
|
|
13090
13411
|
|
|
13091
13412
|
// src/xcode-json-project.ts
|
|
13092
13413
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
13093
|
-
var
|
|
13414
|
+
var import_node_path13 = __toESM(require("node:path"), 1);
|
|
13094
13415
|
var import_json5 = __toESM(require_lib(), 1);
|
|
13095
13416
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
13096
13417
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
@@ -13148,7 +13469,7 @@ var PHASE_ISA = {
|
|
|
13148
13469
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
13149
13470
|
const json = import_json5.default.parse(source);
|
|
13150
13471
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
13151
|
-
const projectDir =
|
|
13472
|
+
const projectDir = import_node_path13.default.dirname(xcodeproj);
|
|
13152
13473
|
const objects = {};
|
|
13153
13474
|
let next = 0;
|
|
13154
13475
|
const add = (entry, id) => {
|
|
@@ -13161,7 +13482,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
13161
13482
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
13162
13483
|
if (base) {
|
|
13163
13484
|
if (base[1] === "PROJECT")
|
|
13164
|
-
return { sourceTree: "<absolute>", path:
|
|
13485
|
+
return { sourceTree: "<absolute>", path: import_node_path13.default.join(projectDir, base[2]) };
|
|
13165
13486
|
if (base[1] === "PRODUCTS")
|
|
13166
13487
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
13167
13488
|
return null;
|
|
@@ -13169,7 +13490,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
13169
13490
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
13170
13491
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
13171
13492
|
if (unescaped.startsWith("~")) return null;
|
|
13172
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
13493
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path13.default.join(groupDir, unescaped) };
|
|
13173
13494
|
};
|
|
13174
13495
|
const memberships = [];
|
|
13175
13496
|
const folders = [];
|
|
@@ -13180,7 +13501,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
13180
13501
|
const kind = text(entry.kind) ?? "file-reference";
|
|
13181
13502
|
const raw = text(entry.path) ?? "";
|
|
13182
13503
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
13183
|
-
const name2 = text(entry.name) ??
|
|
13504
|
+
const name2 = text(entry.name) ?? import_node_path13.default.basename(raw);
|
|
13184
13505
|
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
13185
13506
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
13186
13507
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -13301,7 +13622,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
13301
13622
|
if (!isObject(entry)) continue;
|
|
13302
13623
|
const repository = text(entry.repository);
|
|
13303
13624
|
const local = text(entry.path);
|
|
13304
|
-
const name2 = local !== void 0 ?
|
|
13625
|
+
const name2 = local !== void 0 ? import_node_path13.default.basename(import_node_path13.default.resolve(import_node_path13.default.dirname(xcodeproj), local)) : import_node_path13.default.basename(repository ?? "").replace(/\.git$/, "");
|
|
13305
13626
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
13306
13627
|
isa: "XCRemoteSwiftPackageReference",
|
|
13307
13628
|
repositoryURL: repository ?? "",
|
|
@@ -13476,7 +13797,23 @@ function isJsonObject(value) {
|
|
|
13476
13797
|
|
|
13477
13798
|
// src/xcode-project.ts
|
|
13478
13799
|
var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
|
|
13800
|
+
var CXX_STANDARD_ALIASES = {
|
|
13801
|
+
"c++0x": "c++11",
|
|
13802
|
+
"gnu++0x": "gnu++11"
|
|
13803
|
+
};
|
|
13804
|
+
var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
|
|
13805
|
+
"c++98",
|
|
13806
|
+
"gnu++98",
|
|
13807
|
+
"c++0x",
|
|
13808
|
+
"gnu++0x",
|
|
13809
|
+
"c++14",
|
|
13810
|
+
"gnu++14",
|
|
13811
|
+
"c++17",
|
|
13812
|
+
"gnu++17",
|
|
13813
|
+
"compiler-default"
|
|
13814
|
+
]);
|
|
13479
13815
|
var APPLICATION = "com.apple.product-type.application";
|
|
13816
|
+
var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
|
|
13480
13817
|
var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
|
|
13481
13818
|
"com.apple.product-type.framework",
|
|
13482
13819
|
"com.apple.product-type.framework.static"
|
|
@@ -13494,28 +13831,28 @@ var CONDITIONS = {
|
|
|
13494
13831
|
variant: "normal"
|
|
13495
13832
|
};
|
|
13496
13833
|
function walkFiles(dir) {
|
|
13497
|
-
if (!
|
|
13834
|
+
if (!import_node_fs13.default.existsSync(dir)) return [];
|
|
13498
13835
|
const out = [];
|
|
13499
|
-
for (const entry of
|
|
13836
|
+
for (const entry of import_node_fs13.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
13500
13837
|
if (entry.name.startsWith(".")) continue;
|
|
13501
|
-
const full =
|
|
13838
|
+
const full = import_node_path14.default.join(dir, entry.name);
|
|
13502
13839
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
13503
13840
|
else if (entry.isFile()) out.push(full);
|
|
13504
13841
|
}
|
|
13505
13842
|
return out;
|
|
13506
13843
|
}
|
|
13507
|
-
var isDirectory = (dir) =>
|
|
13844
|
+
var isDirectory = (dir) => import_node_fs13.default.existsSync(dir) && import_node_fs13.default.statSync(dir).isDirectory();
|
|
13508
13845
|
function readXcconfig(file, read) {
|
|
13509
|
-
if (read.includes(file) || !
|
|
13846
|
+
if (read.includes(file) || !import_node_fs13.default.existsSync(file)) return {};
|
|
13510
13847
|
read.push(file);
|
|
13511
13848
|
const settings = {};
|
|
13512
|
-
for (const raw of
|
|
13849
|
+
for (const raw of import_node_fs13.default.readFileSync(file, "utf8").split("\n")) {
|
|
13513
13850
|
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
13514
13851
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
13515
13852
|
if (include) {
|
|
13516
13853
|
Object.assign(
|
|
13517
13854
|
settings,
|
|
13518
|
-
readXcconfig(
|
|
13855
|
+
readXcconfig(import_node_path14.default.resolve(import_node_path14.default.dirname(file), include[1]), read)
|
|
13519
13856
|
);
|
|
13520
13857
|
continue;
|
|
13521
13858
|
}
|
|
@@ -13565,22 +13902,22 @@ function decodeXml(text2) {
|
|
|
13565
13902
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
13566
13903
|
}
|
|
13567
13904
|
function workspaceReferences(workspace) {
|
|
13568
|
-
const data =
|
|
13569
|
-
if (!
|
|
13905
|
+
const data = import_node_path14.default.join(workspace, "contents.xcworkspacedata");
|
|
13906
|
+
if (!import_node_fs13.default.existsSync(data))
|
|
13570
13907
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
13571
|
-
const container =
|
|
13908
|
+
const container = import_node_path14.default.dirname(workspace);
|
|
13572
13909
|
const locate = (location, base) => {
|
|
13573
13910
|
const colon = location.indexOf(":");
|
|
13574
13911
|
const kind = location.slice(0, colon);
|
|
13575
13912
|
const rest = location.slice(colon + 1);
|
|
13576
|
-
if (kind === "group") return
|
|
13577
|
-
if (kind === "container" || kind === "self") return
|
|
13578
|
-
if (kind === "absolute") return
|
|
13579
|
-
throw new Error(`${
|
|
13913
|
+
if (kind === "group") return import_node_path14.default.resolve(base, rest);
|
|
13914
|
+
if (kind === "container" || kind === "self") return import_node_path14.default.resolve(container, rest);
|
|
13915
|
+
if (kind === "absolute") return import_node_path14.default.resolve(rest);
|
|
13916
|
+
throw new Error(`${import_node_path14.default.basename(workspace)} has an unsupported location ${location}`);
|
|
13580
13917
|
};
|
|
13581
13918
|
const groups = [container];
|
|
13582
13919
|
const references = [];
|
|
13583
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
13920
|
+
for (const [, closing, tag, attributes, selfClosing] of import_node_fs13.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
13584
13921
|
if (closing) {
|
|
13585
13922
|
if (tag === "Group") groups.pop();
|
|
13586
13923
|
continue;
|
|
@@ -13631,8 +13968,8 @@ function remotePackageRequirements(projects) {
|
|
|
13631
13968
|
var loaded2 = /* @__PURE__ */ new Map();
|
|
13632
13969
|
function xcodeProjectFile(xcodeproj) {
|
|
13633
13970
|
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
13634
|
-
const file =
|
|
13635
|
-
if (
|
|
13971
|
+
const file = import_node_path14.default.join(xcodeproj, name2);
|
|
13972
|
+
if (import_node_fs13.default.existsSync(file)) return file;
|
|
13636
13973
|
}
|
|
13637
13974
|
return null;
|
|
13638
13975
|
}
|
|
@@ -13640,8 +13977,8 @@ function loadProject(xcodeproj) {
|
|
|
13640
13977
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
13641
13978
|
if (!projectFile)
|
|
13642
13979
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
13643
|
-
const source =
|
|
13644
|
-
const digest = (0,
|
|
13980
|
+
const source = import_node_fs13.default.readFileSync(projectFile, "utf8");
|
|
13981
|
+
const digest = (0, import_node_crypto4.createHash)("sha256").update(source).digest("hex");
|
|
13645
13982
|
const cached = loaded2.get(projectFile);
|
|
13646
13983
|
if (cached?.digest === digest) return cached.project;
|
|
13647
13984
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -13657,10 +13994,10 @@ function loadProject(xcodeproj) {
|
|
|
13657
13994
|
if (!project || project.isa !== "PBXProject") {
|
|
13658
13995
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
13659
13996
|
}
|
|
13660
|
-
const projectDir =
|
|
13661
|
-
|
|
13997
|
+
const projectDir = import_node_fs13.default.realpathSync(
|
|
13998
|
+
import_node_path14.default.resolve(import_node_path14.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
13662
13999
|
);
|
|
13663
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
14000
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path14.default.join);
|
|
13664
14001
|
const result = {
|
|
13665
14002
|
xcodeproj,
|
|
13666
14003
|
projectFile,
|
|
@@ -13694,8 +14031,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
13694
14031
|
const relative3 = str(config.baseConfigurationReferenceRelativePath);
|
|
13695
14032
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
13696
14033
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
13697
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative3 ?
|
|
13698
|
-
if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !
|
|
14034
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative3 ? import_node_path14.default.resolve(directory, relative3) : null;
|
|
14035
|
+
if (options.requireSources !== false && (base || anchor || relative3) && (!baseFile || !import_node_fs13.default.existsSync(baseFile)))
|
|
13699
14036
|
throw new Error(
|
|
13700
14037
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative3 ?? anchor}'`
|
|
13701
14038
|
);
|
|
@@ -13751,7 +14088,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
13751
14088
|
const derived = (key) => {
|
|
13752
14089
|
if (key === "AppIdentifierPrefix" || key === "TeamIdentifierPrefix")
|
|
13753
14090
|
return teamPrefix();
|
|
13754
|
-
return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : process.env[key] ?? "";
|
|
14091
|
+
return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : options.environment?.[key] ?? process.env[key] ?? "";
|
|
13755
14092
|
};
|
|
13756
14093
|
return {
|
|
13757
14094
|
get,
|
|
@@ -13773,27 +14110,27 @@ function settingList(value) {
|
|
|
13773
14110
|
);
|
|
13774
14111
|
return items2;
|
|
13775
14112
|
}
|
|
13776
|
-
function expandSearchPath(directory,
|
|
13777
|
-
if (
|
|
14113
|
+
function expandSearchPath(directory, rules2) {
|
|
14114
|
+
if (import_node_path14.default.basename(directory) !== "**") return [directory];
|
|
13778
14115
|
const expanded = [];
|
|
13779
14116
|
const seen = /* @__PURE__ */ new Set();
|
|
13780
|
-
const queue = [
|
|
14117
|
+
const queue = [import_node_path14.default.dirname(directory)];
|
|
13781
14118
|
for (let at = 0; at < queue.length; at++) {
|
|
13782
14119
|
const current = queue[at];
|
|
13783
14120
|
let real;
|
|
13784
14121
|
try {
|
|
13785
|
-
real =
|
|
14122
|
+
real = import_node_fs13.default.realpathSync(current);
|
|
13786
14123
|
} catch {
|
|
13787
14124
|
continue;
|
|
13788
14125
|
}
|
|
13789
|
-
if (!
|
|
14126
|
+
if (!import_node_fs13.default.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
13790
14127
|
seen.add(real);
|
|
13791
14128
|
expanded.push(current);
|
|
13792
|
-
for (const entry of
|
|
13793
|
-
if (entry.isSymbolicLink() ? !
|
|
13794
|
-
if (
|
|
14129
|
+
for (const entry of import_node_fs13.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
14130
|
+
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
14131
|
+
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
13795
14132
|
continue;
|
|
13796
|
-
queue.push(
|
|
14133
|
+
queue.push(import_node_path14.default.join(current, entry.name));
|
|
13797
14134
|
}
|
|
13798
14135
|
}
|
|
13799
14136
|
return expanded;
|
|
@@ -13875,14 +14212,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
13875
14212
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
13876
14213
|
return [];
|
|
13877
14214
|
copies.push({
|
|
13878
|
-
from:
|
|
13879
|
-
to:
|
|
14215
|
+
from: import_node_path14.default.resolve(projectDir, operands[0]),
|
|
14216
|
+
to: import_node_path14.default.resolve(projectDir, operands[1])
|
|
13880
14217
|
});
|
|
13881
14218
|
}
|
|
13882
14219
|
return copies;
|
|
13883
14220
|
}
|
|
13884
14221
|
function fileListEntries(file, absolute) {
|
|
13885
|
-
return
|
|
14222
|
+
return import_node_fs13.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
13886
14223
|
}
|
|
13887
14224
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
13888
14225
|
const { project, target, id: targetId } = ref;
|
|
@@ -13895,7 +14232,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
13895
14232
|
const copiedFiles = [];
|
|
13896
14233
|
let generatedInfoPlist = false;
|
|
13897
14234
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
13898
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
14235
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path14.default.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
13899
14236
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
13900
14237
|
for (const phaseId of list(target.buildPhases)) {
|
|
13901
14238
|
const phase = project.object(phaseId);
|
|
@@ -13904,7 +14241,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
13904
14241
|
copiedFiles.push(
|
|
13905
14242
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
13906
14243
|
);
|
|
13907
|
-
const absolute = (raw) =>
|
|
14244
|
+
const absolute = (raw) => import_node_path14.default.resolve(project.projectDir, expand(raw, settings));
|
|
13908
14245
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
13909
14246
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
13910
14247
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -13913,7 +14250,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
13913
14250
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
13914
14251
|
).map((raw) => {
|
|
13915
14252
|
const file = absolute(raw);
|
|
13916
|
-
if (!
|
|
14253
|
+
if (!import_node_fs13.default.existsSync(file)) {
|
|
13917
14254
|
return { file, entries: [] };
|
|
13918
14255
|
}
|
|
13919
14256
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -13934,13 +14271,13 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
13934
14271
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
13935
14272
|
];
|
|
13936
14273
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
13937
|
-
for (const file of inputFiles) if (
|
|
14274
|
+
for (const file of inputFiles) if (import_node_fs13.default.existsSync(file)) projectInputs.add(file);
|
|
13938
14275
|
}
|
|
13939
14276
|
if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
13940
|
-
const phaseDir =
|
|
14277
|
+
const phaseDir = import_node_path14.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
13941
14278
|
for (const lists of fileLists.values())
|
|
13942
14279
|
for (const { file } of lists)
|
|
13943
|
-
if (!
|
|
14280
|
+
if (!import_node_fs13.default.existsSync(file))
|
|
13944
14281
|
throw new Error(
|
|
13945
14282
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
13946
14283
|
);
|
|
@@ -13959,34 +14296,34 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
13959
14296
|
const lists = fileLists.get(kind);
|
|
13960
14297
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
13961
14298
|
lists.forEach((_item, index) => {
|
|
13962
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
14299
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path14.default.join(
|
|
13963
14300
|
phaseDir,
|
|
13964
14301
|
`${kind}-${index}.xcfilelist`
|
|
13965
14302
|
);
|
|
13966
14303
|
});
|
|
13967
14304
|
}
|
|
13968
|
-
const signature = (0,
|
|
14305
|
+
const signature = (0, import_node_crypto4.createHash)("sha256").update(
|
|
13969
14306
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
13970
14307
|
);
|
|
13971
14308
|
for (const file of inputFiles) {
|
|
13972
14309
|
signature.update(file);
|
|
13973
|
-
if (
|
|
13974
|
-
const stat =
|
|
14310
|
+
if (import_node_fs13.default.existsSync(file)) {
|
|
14311
|
+
const stat = import_node_fs13.default.statSync(file);
|
|
13975
14312
|
signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
|
|
13976
14313
|
} else signature.update("missing");
|
|
13977
14314
|
}
|
|
13978
14315
|
const stamp = signature.digest("hex");
|
|
13979
14316
|
const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
13980
|
-
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) =>
|
|
14317
|
+
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs13.default.existsSync(file)))
|
|
13981
14318
|
continue;
|
|
13982
|
-
|
|
13983
|
-
|
|
13984
|
-
|
|
14319
|
+
import_node_fs13.default.mkdirSync(phaseDir, { recursive: true });
|
|
14320
|
+
import_node_fs13.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
14321
|
+
import_node_fs13.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
13985
14322
|
for (const output of allOutputs)
|
|
13986
|
-
|
|
14323
|
+
import_node_fs13.default.mkdirSync(import_node_path14.default.dirname(output), { recursive: true });
|
|
13987
14324
|
for (const [kind, lists] of fileLists)
|
|
13988
14325
|
lists.forEach((item, index) => {
|
|
13989
|
-
|
|
14326
|
+
import_node_fs13.default.writeFileSync(
|
|
13990
14327
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
13991
14328
|
`${item.entries.join("\n")}
|
|
13992
14329
|
`
|
|
@@ -14012,7 +14349,7 @@ ${output}`
|
|
|
14012
14349
|
);
|
|
14013
14350
|
}
|
|
14014
14351
|
const missing2 = allOutputs.filter(
|
|
14015
|
-
(file) => file === infoPlistOutput && !
|
|
14352
|
+
(file) => file === infoPlistOutput && !import_node_fs13.default.existsSync(file)
|
|
14016
14353
|
);
|
|
14017
14354
|
if (missing2.length > 0)
|
|
14018
14355
|
throw new Error(
|
|
@@ -14025,8 +14362,8 @@ ${output}`
|
|
|
14025
14362
|
project.objects,
|
|
14026
14363
|
targetId,
|
|
14027
14364
|
project.resolvePath,
|
|
14028
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
14029
|
-
|
|
14365
|
+
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs13.default.existsSync(file) ? [file] : [],
|
|
14366
|
+
import_node_path14.default.join,
|
|
14030
14367
|
(file, kind) => {
|
|
14031
14368
|
if (kind === "header") {
|
|
14032
14369
|
headers.add(file);
|
|
@@ -14036,9 +14373,9 @@ ${output}`
|
|
|
14036
14373
|
resources.add(file);
|
|
14037
14374
|
return;
|
|
14038
14375
|
}
|
|
14039
|
-
if (!
|
|
14376
|
+
if (!import_node_fs13.default.existsSync(file)) {
|
|
14040
14377
|
if (options.requireSources === false) return;
|
|
14041
|
-
const script = scriptForOutput.get(
|
|
14378
|
+
const script = scriptForOutput.get(import_node_path14.default.normalize(file));
|
|
14042
14379
|
throw new Error(
|
|
14043
14380
|
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}`
|
|
14044
14381
|
);
|
|
@@ -14049,8 +14386,8 @@ ${output}`
|
|
|
14049
14386
|
);
|
|
14050
14387
|
for (const [file] of scriptForOutput) {
|
|
14051
14388
|
if (sources.has(file) || allSources.has(file)) continue;
|
|
14052
|
-
if (!
|
|
14053
|
-
const canonical =
|
|
14389
|
+
if (!import_node_fs13.default.existsSync(file)) continue;
|
|
14390
|
+
const canonical = import_node_fs13.default.realpathSync(file);
|
|
14054
14391
|
if (sources.has(canonical) || allSources.has(canonical)) continue;
|
|
14055
14392
|
allSources.add(canonical);
|
|
14056
14393
|
sources.add(canonical);
|
|
@@ -14067,37 +14404,37 @@ ${output}`
|
|
|
14067
14404
|
function commonAncestor(dirs) {
|
|
14068
14405
|
let common = dirs[0];
|
|
14069
14406
|
for (const dir of dirs) {
|
|
14070
|
-
while (common !==
|
|
14071
|
-
common =
|
|
14407
|
+
while (common !== import_node_path14.default.dirname(common) && import_node_path14.default.relative(common, dir).startsWith(".."))
|
|
14408
|
+
common = import_node_path14.default.dirname(common);
|
|
14072
14409
|
}
|
|
14073
14410
|
return common;
|
|
14074
14411
|
}
|
|
14075
|
-
var isPodsProject = (xcodeproj) =>
|
|
14412
|
+
var isPodsProject = (xcodeproj) => import_node_path14.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path14.default.basename(import_node_path14.default.dirname(xcodeproj)) === "Pods";
|
|
14076
14413
|
function installedPodsSandbox(pods) {
|
|
14077
|
-
const podfileLock =
|
|
14078
|
-
const manifestLock =
|
|
14079
|
-
if (!
|
|
14414
|
+
const podfileLock = import_node_path14.default.join(import_node_path14.default.dirname(pods), "Podfile.lock");
|
|
14415
|
+
const manifestLock = import_node_path14.default.join(pods, "Manifest.lock");
|
|
14416
|
+
if (!import_node_fs13.default.existsSync(podfileLock))
|
|
14080
14417
|
throw new Error(
|
|
14081
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
14418
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path14.default.dirname(pods)}`
|
|
14082
14419
|
);
|
|
14083
|
-
if (!
|
|
14420
|
+
if (!import_node_fs13.default.existsSync(manifestLock) || !import_node_fs13.default.readFileSync(manifestLock).equals(import_node_fs13.default.readFileSync(podfileLock)))
|
|
14084
14421
|
throw new Error(
|
|
14085
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
14422
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path14.default.dirname(pods)}`
|
|
14086
14423
|
);
|
|
14087
14424
|
const specChecksums = {};
|
|
14088
|
-
const lines =
|
|
14425
|
+
const lines = import_node_fs13.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
14089
14426
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
14090
14427
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
14091
14428
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
14092
14429
|
if (!entry) break;
|
|
14093
14430
|
specChecksums[entry[1]] = entry[2];
|
|
14094
14431
|
}
|
|
14095
|
-
const specs =
|
|
14432
|
+
const specs = import_node_path14.default.join(pods, "Local Podspecs");
|
|
14096
14433
|
return {
|
|
14097
14434
|
podfileLock,
|
|
14098
14435
|
manifestLock,
|
|
14099
14436
|
specChecksums,
|
|
14100
|
-
localPodspecs: isDirectory(specs) ?
|
|
14437
|
+
localPodspecs: isDirectory(specs) ? import_node_fs13.default.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => import_node_path14.default.join(specs, name2)) : []
|
|
14101
14438
|
};
|
|
14102
14439
|
}
|
|
14103
14440
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -14109,14 +14446,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
14109
14446
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
14110
14447
|
if (installedPods && isPodsProject(xcodeproj))
|
|
14111
14448
|
throw new Error(
|
|
14112
|
-
`${
|
|
14449
|
+
`${import_node_path14.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path14.default.dirname(import_node_path14.default.dirname(xcodeproj))}`
|
|
14113
14450
|
);
|
|
14114
14451
|
return;
|
|
14115
14452
|
}
|
|
14116
|
-
const key =
|
|
14117
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
14453
|
+
const key = import_node_fs13.default.realpathSync(xcodeproj);
|
|
14454
|
+
if (projectAt.has(key) || !installedPods && key.split(import_node_path14.default.sep).includes("Pods"))
|
|
14118
14455
|
return;
|
|
14119
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
14456
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path14.default.dirname(key));
|
|
14120
14457
|
const project = loadProject(key);
|
|
14121
14458
|
projectAt.set(key, project);
|
|
14122
14459
|
projects.push(project);
|
|
@@ -14132,12 +14469,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
14132
14469
|
for (const reference of listed)
|
|
14133
14470
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
14134
14471
|
if (projects.length === 0) {
|
|
14135
|
-
throw new Error(`${
|
|
14472
|
+
throw new Error(`${import_node_path14.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
14136
14473
|
}
|
|
14137
|
-
const podfile =
|
|
14138
|
-
if (installedPods && !cocoapods &&
|
|
14474
|
+
const podfile = import_node_path14.default.join(import_node_path14.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
14475
|
+
if (installedPods && !cocoapods && import_node_fs13.default.existsSync(podfile))
|
|
14139
14476
|
throw new Error(
|
|
14140
|
-
`${podfile} is not installed into ${
|
|
14477
|
+
`${podfile} is not installed into ${import_node_path14.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path14.default.dirname(podfile)} and open the workspace it writes`
|
|
14141
14478
|
);
|
|
14142
14479
|
return { listed, projects, projectAt, cocoapods };
|
|
14143
14480
|
}
|
|
@@ -14173,7 +14510,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
|
14173
14510
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
|
|
14174
14511
|
}
|
|
14175
14512
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
14176
|
-
const xcodeprojOrWorkspace =
|
|
14513
|
+
const xcodeprojOrWorkspace = import_node_fs13.default.realpathSync(input);
|
|
14177
14514
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
14178
14515
|
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
14179
14516
|
xcodeprojOrWorkspace,
|
|
@@ -14182,7 +14519,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14182
14519
|
const allTargets = projects.flatMap(projectTargets);
|
|
14183
14520
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
14184
14521
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
14185
|
-
const container =
|
|
14522
|
+
const container = import_node_path14.default.basename(xcodeprojOrWorkspace);
|
|
14186
14523
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
14187
14524
|
if (named.length !== 1) {
|
|
14188
14525
|
throw new Error(
|
|
@@ -14195,15 +14532,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14195
14532
|
for (const ref of allTargets) {
|
|
14196
14533
|
const product = ref.project.object(str(ref.target.productReference));
|
|
14197
14534
|
const file = str(product?.path);
|
|
14198
|
-
if (file && !byProduct.has(
|
|
14199
|
-
byProduct.set(
|
|
14535
|
+
if (file && !byProduct.has(import_node_path14.default.basename(file)))
|
|
14536
|
+
byProduct.set(import_node_path14.default.basename(file), ref);
|
|
14200
14537
|
}
|
|
14201
14538
|
const proxied = (project, proxyId) => {
|
|
14202
14539
|
const proxy = project.object(proxyId);
|
|
14203
14540
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
14204
14541
|
const portal = str(proxy.containerPortal);
|
|
14205
14542
|
const portalPath = project.resolvePath(portal ?? "");
|
|
14206
|
-
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath &&
|
|
14543
|
+
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs13.default.existsSync(portalPath) ? projectAt.get(import_node_fs13.default.realpathSync(portalPath)) : void 0;
|
|
14207
14544
|
const remote = str(proxy.remoteGlobalIDString);
|
|
14208
14545
|
if (!owner || !remote) return void 0;
|
|
14209
14546
|
return projectTargets(owner).find(
|
|
@@ -14224,12 +14561,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14224
14561
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
14225
14562
|
for (const buildFileId of list(phase.files)) {
|
|
14226
14563
|
const file = project.object(str(project.object(buildFileId)?.fileRef));
|
|
14227
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
14564
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path14.default.basename(str(file.path) ?? "")) : void 0;
|
|
14228
14565
|
if (resolved) found.push(resolved);
|
|
14229
14566
|
}
|
|
14230
14567
|
}
|
|
14231
14568
|
return found.filter(
|
|
14232
|
-
(candidate) => candidate.target.isa === "PBXAggregateTarget" || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
14569
|
+
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
14233
14570
|
);
|
|
14234
14571
|
};
|
|
14235
14572
|
const order = [];
|
|
@@ -14273,8 +14610,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14273
14610
|
ref.project.objects,
|
|
14274
14611
|
ref.id,
|
|
14275
14612
|
ref.project.resolvePath,
|
|
14276
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
14277
|
-
|
|
14613
|
+
(file) => isDirectory(file) ? walkFiles(file) : import_node_fs13.default.existsSync(file) ? [file] : [],
|
|
14614
|
+
import_node_path14.default.join,
|
|
14278
14615
|
(file, kind) => {
|
|
14279
14616
|
if (kind === "header") found.push(file);
|
|
14280
14617
|
}
|
|
@@ -14290,12 +14627,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14290
14627
|
for (const ref of projectTargets(project)) {
|
|
14291
14628
|
const product = productName(ref);
|
|
14292
14629
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
14293
|
-
const name2 =
|
|
14630
|
+
const name2 = import_node_path14.default.basename(file);
|
|
14294
14631
|
if (!entries.has(name2))
|
|
14295
14632
|
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
14296
14633
|
}
|
|
14297
14634
|
for (const file of synchronizedHeaders(ref)) {
|
|
14298
|
-
const name2 =
|
|
14635
|
+
const name2 = import_node_path14.default.basename(file);
|
|
14299
14636
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
14300
14637
|
}
|
|
14301
14638
|
}
|
|
@@ -14305,7 +14642,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14305
14642
|
if (folder === null) continue;
|
|
14306
14643
|
for (const file of walkFiles(folder)) {
|
|
14307
14644
|
if (!HEADER_FILE.test(file)) continue;
|
|
14308
|
-
const name2 =
|
|
14645
|
+
const name2 = import_node_path14.default.basename(file);
|
|
14309
14646
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
14310
14647
|
}
|
|
14311
14648
|
}
|
|
@@ -14313,18 +14650,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14313
14650
|
for (const id of Object.keys(project.objects)) {
|
|
14314
14651
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
14315
14652
|
const file = project.resolvePath(id);
|
|
14316
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
14317
|
-
entries.set(
|
|
14653
|
+
if (file && HEADER_FILE.test(file) && !entries.has(import_node_path14.default.basename(file)))
|
|
14654
|
+
entries.set(import_node_path14.default.basename(file), file);
|
|
14318
14655
|
}
|
|
14319
14656
|
const map2 = [...entries];
|
|
14320
14657
|
projectHeaderMaps.set(project, map2);
|
|
14321
14658
|
return map2;
|
|
14322
14659
|
};
|
|
14323
14660
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
14324
|
-
const buildDir = (project) =>
|
|
14661
|
+
const buildDir = (project) => import_node_path14.default.join(project.projectDir, ".build/peach-xcode/Build");
|
|
14325
14662
|
const podsBuild = {
|
|
14326
|
-
SYMROOT:
|
|
14327
|
-
OBJROOT:
|
|
14663
|
+
SYMROOT: import_node_path14.default.join(buildDir(app.project), "Products"),
|
|
14664
|
+
OBJROOT: import_node_path14.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
14328
14665
|
};
|
|
14329
14666
|
const moduleTarget = (ref) => {
|
|
14330
14667
|
const name2 = str(ref.target.name) ?? ref.id;
|
|
@@ -14339,18 +14676,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14339
14676
|
TARGET_NAME: name2,
|
|
14340
14677
|
TARGETNAME: "$(TARGET_NAME)",
|
|
14341
14678
|
PROJECT: "$(PROJECT_NAME)",
|
|
14342
|
-
PROJECT_NAME:
|
|
14679
|
+
PROJECT_NAME: import_node_path14.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
14343
14680
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
14344
14681
|
SRCROOT: ref.project.projectDir,
|
|
14345
14682
|
SOURCE_ROOT: ref.project.projectDir,
|
|
14346
14683
|
PROJECT_DIR: ref.project.projectDir,
|
|
14347
|
-
SYMROOT:
|
|
14684
|
+
SYMROOT: import_node_path14.default.join(buildDir(ref.project), "Products"),
|
|
14348
14685
|
BUILD_DIR: "$(SYMROOT)",
|
|
14349
14686
|
BUILD_ROOT: "$(SYMROOT)",
|
|
14350
|
-
OBJROOT:
|
|
14687
|
+
OBJROOT: import_node_path14.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
14351
14688
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
14352
14689
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
14353
14690
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
14691
|
+
UNLOCALIZED_RESOURCES_FOLDER_PATH: str(ref.project.object(str(ref.target.productReference))?.path) ?? "",
|
|
14354
14692
|
PROJECT_TEMP_DIR: "$(OBJROOT)/$(PROJECT_NAME).build",
|
|
14355
14693
|
CONFIGURATION_TEMP_DIR: "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
14356
14694
|
TARGET_TEMP_DIR: "$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME).build",
|
|
@@ -14358,6 +14696,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14358
14696
|
TEMP_FILES_DIR: "$(TEMP_DIR)",
|
|
14359
14697
|
TEMP_FILE_DIR: "$(TEMP_DIR)",
|
|
14360
14698
|
TEMP_ROOT: "$(OBJROOT)",
|
|
14699
|
+
OBJECT_FILE_DIR: "$(TARGET_TEMP_DIR)/Objects",
|
|
14700
|
+
// the per-variant object directory carries no arch: xcode defines
|
|
14701
|
+
// OBJECT_FILE_DIR_normal as OBJECT_FILE_DIR-normal, and the target
|
|
14702
|
+
// appends $(CURRENT_ARCH) itself for the per-arch directory.
|
|
14703
|
+
OBJECT_FILE_DIR_normal: "$(OBJECT_FILE_DIR)-normal",
|
|
14361
14704
|
DERIVED_FILE_DIR: "$(TARGET_TEMP_DIR)/DerivedSources",
|
|
14362
14705
|
DERIVED_FILES_DIR: "$(DERIVED_FILE_DIR)",
|
|
14363
14706
|
DERIVED_SOURCES_DIR: "$(DERIVED_FILE_DIR)",
|
|
@@ -14381,7 +14724,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14381
14724
|
xcconfigs
|
|
14382
14725
|
);
|
|
14383
14726
|
const searchRules = recursiveSearchRules(settings2);
|
|
14384
|
-
const absolute = (file) =>
|
|
14727
|
+
const absolute = (file) => import_node_path14.default.resolve(ref.project.projectDir, file);
|
|
14385
14728
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
14386
14729
|
const product = settings2("PRODUCT_NAME");
|
|
14387
14730
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -14412,7 +14755,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14412
14755
|
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
14413
14756
|
);
|
|
14414
14757
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
14415
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
14758
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path14.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
14416
14759
|
if (versioning) {
|
|
14417
14760
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
14418
14761
|
const custom = [
|
|
@@ -14425,7 +14768,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14425
14768
|
].filter((key) => settings2(key));
|
|
14426
14769
|
if (custom.length)
|
|
14427
14770
|
throw new Error(
|
|
14428
|
-
`${name2}: Xcode generates ${
|
|
14771
|
+
`${name2}: Xcode generates ${import_node_path14.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
14429
14772
|
);
|
|
14430
14773
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
14431
14774
|
const [major, minor] = version.split(".");
|
|
@@ -14438,9 +14781,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14438
14781
|
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number};`,
|
|
14439
14782
|
""
|
|
14440
14783
|
].join("\n");
|
|
14441
|
-
if (!
|
|
14442
|
-
|
|
14443
|
-
|
|
14784
|
+
if (!import_node_fs13.default.existsSync(versioning) || import_node_fs13.default.readFileSync(versioning, "utf8") !== unit) {
|
|
14785
|
+
import_node_fs13.default.mkdirSync(import_node_path14.default.dirname(versioning), { recursive: true });
|
|
14786
|
+
import_node_fs13.default.writeFileSync(versioning, unit);
|
|
14444
14787
|
}
|
|
14445
14788
|
allSources.push(versioning);
|
|
14446
14789
|
}
|
|
@@ -14459,7 +14802,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14459
14802
|
const headerFiles = headerPhase(ref);
|
|
14460
14803
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
14461
14804
|
for (const { file, visibility } of headerFiles) {
|
|
14462
|
-
const name3 =
|
|
14805
|
+
const name3 = import_node_path14.default.basename(file);
|
|
14463
14806
|
const published = visibility !== "Project";
|
|
14464
14807
|
if (!ownHeaders.has(name3))
|
|
14465
14808
|
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
@@ -14467,7 +14810,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14467
14810
|
ownHeaders.set(`${product}/${name3}`, file);
|
|
14468
14811
|
}
|
|
14469
14812
|
for (const file of synchronizedHeaders(ref)) {
|
|
14470
|
-
const name3 =
|
|
14813
|
+
const name3 = import_node_path14.default.basename(file);
|
|
14471
14814
|
if (ownHeaders.has(name3)) continue;
|
|
14472
14815
|
ownHeaders.set(name3, file);
|
|
14473
14816
|
const qualified = `${product}/${name3}`;
|
|
@@ -14479,16 +14822,41 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14479
14822
|
const otherProduct = productName(other);
|
|
14480
14823
|
for (const { file, visibility } of headerPhase(other)) {
|
|
14481
14824
|
if (visibility === "Project") continue;
|
|
14482
|
-
const key = `${otherProduct}/${
|
|
14825
|
+
const key = `${otherProduct}/${import_node_path14.default.basename(file)}`;
|
|
14483
14826
|
if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
|
|
14484
14827
|
}
|
|
14485
14828
|
}
|
|
14486
|
-
const wrapper =
|
|
14829
|
+
const wrapper = import_node_path14.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
14487
14830
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
14488
|
-
const
|
|
14831
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path14.default.join(import_node_path14.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
14832
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs13.default.existsSync(moduleMap) && import_node_fs13.default.existsSync(frameworkUmbrella) ? {
|
|
14833
|
+
framework: true,
|
|
14834
|
+
moduleMap,
|
|
14835
|
+
umbrella: frameworkUmbrella,
|
|
14836
|
+
outputModuleMap: import_node_path14.default.join(wrapper, "Modules", "module.modulemap"),
|
|
14837
|
+
outputUmbrella: import_node_path14.default.join(
|
|
14838
|
+
wrapper,
|
|
14839
|
+
"Headers",
|
|
14840
|
+
import_node_path14.default.basename(frameworkUmbrella)
|
|
14841
|
+
),
|
|
14842
|
+
outputHeader: import_node_path14.default.join(
|
|
14843
|
+
wrapper,
|
|
14844
|
+
"Headers",
|
|
14845
|
+
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
14846
|
+
)
|
|
14847
|
+
} : null;
|
|
14848
|
+
const swiftCompatibility = compatibility ? {
|
|
14849
|
+
framework: false,
|
|
14850
|
+
moduleMap: compatibility.moduleMap,
|
|
14851
|
+
umbrella: compatibility.umbrella,
|
|
14852
|
+
outputModuleMap: compatibility.outputModuleMap,
|
|
14853
|
+
outputUmbrella: compatibility.outputUmbrella,
|
|
14854
|
+
outputHeader: compatibility.outputHeader
|
|
14855
|
+
} : frameworkCompatibility;
|
|
14856
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path14.default.relative(import_node_path14.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path14.default.sep)[0] !== ".." && import_node_fs13.default.existsSync(moduleMap) ? import_node_fs13.default.readdirSync(import_node_path14.default.dirname(moduleMap)).flatMap((entry) => {
|
|
14489
14857
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
14490
|
-
const file =
|
|
14491
|
-
return
|
|
14858
|
+
const file = import_node_path14.default.join(import_node_path14.default.dirname(moduleMap), entry);
|
|
14859
|
+
return import_node_fs13.default.existsSync(file) ? [file] : [];
|
|
14492
14860
|
}) : [];
|
|
14493
14861
|
const fileFlags = {};
|
|
14494
14862
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -14506,6 +14874,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14506
14874
|
);
|
|
14507
14875
|
}
|
|
14508
14876
|
}
|
|
14877
|
+
const cStandard = settings2("GCC_C_LANGUAGE_STANDARD");
|
|
14878
|
+
const cxxStandard = settings2("CLANG_CXX_LANGUAGE_STANDARD");
|
|
14509
14879
|
return {
|
|
14510
14880
|
settings: settings2,
|
|
14511
14881
|
keys,
|
|
@@ -14531,13 +14901,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14531
14901
|
swift: {
|
|
14532
14902
|
flags: settingList(settings2("OTHER_SWIFT_FLAGS")),
|
|
14533
14903
|
includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
|
|
14534
|
-
compatibility:
|
|
14535
|
-
moduleMap: compatibility.moduleMap,
|
|
14536
|
-
umbrella: compatibility.umbrella,
|
|
14537
|
-
outputModuleMap: compatibility.outputModuleMap,
|
|
14538
|
-
outputUmbrella: compatibility.outputUmbrella,
|
|
14539
|
-
outputHeader: compatibility.outputHeader
|
|
14540
|
-
} : null
|
|
14904
|
+
compatibility: swiftCompatibility
|
|
14541
14905
|
}
|
|
14542
14906
|
} : {},
|
|
14543
14907
|
...native ? {
|
|
@@ -14553,7 +14917,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14553
14917
|
...headers,
|
|
14554
14918
|
...Object.keys(ref.project.objects).flatMap((id) => {
|
|
14555
14919
|
const file = ref.project.resolvePath(id);
|
|
14556
|
-
return file && HEADER_FILE.test(file) &&
|
|
14920
|
+
return file && HEADER_FILE.test(file) && import_node_fs13.default.existsSync(file) ? [file] : [];
|
|
14557
14921
|
})
|
|
14558
14922
|
])
|
|
14559
14923
|
],
|
|
@@ -14562,15 +14926,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14562
14926
|
// xcode searches its products' include directory before
|
|
14563
14927
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
14564
14928
|
headerSearchPaths: [
|
|
14565
|
-
|
|
14929
|
+
import_node_path14.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
14566
14930
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
14567
14931
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
14568
14932
|
),
|
|
14569
|
-
|
|
14933
|
+
import_node_path14.default.join(
|
|
14570
14934
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
14571
14935
|
settings2("CURRENT_ARCH")
|
|
14572
14936
|
),
|
|
14573
|
-
|
|
14937
|
+
import_node_path14.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
14574
14938
|
settings2("DERIVED_FILE_DIR")
|
|
14575
14939
|
],
|
|
14576
14940
|
userHeaderSearchPaths: settingList(
|
|
@@ -14587,14 +14951,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14587
14951
|
settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
|
|
14588
14952
|
...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
|
|
14589
14953
|
...settings2("CLANG_ENABLE_MODULES") === "YES" ? ["-fmodules"] : [],
|
|
14590
|
-
...
|
|
14954
|
+
...cStandard && cStandard !== "compiler-default" ? [`-std=${cStandard}`] : [],
|
|
14591
14955
|
...settingList(settings2("GCC_PREPROCESSOR_DEFINITIONS")).map(
|
|
14592
14956
|
(value) => `-D${value}`
|
|
14593
14957
|
),
|
|
14594
14958
|
...settingList(settings2("OTHER_CFLAGS"))
|
|
14595
14959
|
],
|
|
14596
14960
|
cxxFlags: [
|
|
14597
|
-
...
|
|
14961
|
+
...cxxStandard && cxxStandard !== "compiler-default" ? [`-std=${CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard}`] : [],
|
|
14962
|
+
// clang.xcspec's hidden CLANG_DISABLE_CXX_MODULES (default
|
|
14963
|
+
// YES) keeps c++ and objective-c++ units out of modules when
|
|
14964
|
+
// modules are on or the standard is c++20 or later.
|
|
14965
|
+
...settings2("CLANG_DISABLE_CXX_MODULES") !== "NO" && (settings2("CLANG_ENABLE_MODULES") === "YES" || !PRE_CXX20_STANDARDS.has(cxxStandard || "compiler-default")) ? ["-fno-cxx-modules"] : [],
|
|
14598
14966
|
...settingList(settings2("OTHER_CPLUSPLUSFLAGS"))
|
|
14599
14967
|
],
|
|
14600
14968
|
fileFlags,
|
|
@@ -14610,16 +14978,42 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14610
14978
|
...headerFiles.flatMap(
|
|
14611
14979
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
14612
14980
|
[
|
|
14613
|
-
|
|
14981
|
+
import_node_path14.default.join(
|
|
14614
14982
|
wrapper,
|
|
14615
14983
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
14616
|
-
|
|
14984
|
+
import_node_path14.default.basename(file)
|
|
14617
14985
|
),
|
|
14618
14986
|
file
|
|
14619
14987
|
]
|
|
14620
14988
|
]
|
|
14621
14989
|
),
|
|
14622
|
-
|
|
14990
|
+
// a copy files phase into the products directory, as
|
|
14991
|
+
// cocoapods writes for each header_mappings_dir folder.
|
|
14992
|
+
...list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
14993
|
+
const phase = ref.project.object(phaseId);
|
|
14994
|
+
if (phase?.isa !== "PBXCopyFilesBuildPhase" || str(phase.dstSubfolderSpec) !== "16")
|
|
14995
|
+
return [];
|
|
14996
|
+
const destination = expand(
|
|
14997
|
+
str(phase.dstPath) ?? "",
|
|
14998
|
+
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path14.default.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path14.default.join(wrapper, "PrivateHeaders") : settings2(name3)
|
|
14999
|
+
);
|
|
15000
|
+
return list(phase.files).flatMap((id) => {
|
|
15001
|
+
const file = ref.project.resolvePath(
|
|
15002
|
+
str(ref.project.object(id)?.fileRef) ?? ""
|
|
15003
|
+
);
|
|
15004
|
+
return file && HEADER_FILE.test(file) ? [
|
|
15005
|
+
[
|
|
15006
|
+
import_node_path14.default.resolve(
|
|
15007
|
+
settings2("BUILT_PRODUCTS_DIR"),
|
|
15008
|
+
destination,
|
|
15009
|
+
import_node_path14.default.basename(file)
|
|
15010
|
+
),
|
|
15011
|
+
file
|
|
15012
|
+
]
|
|
15013
|
+
] : [];
|
|
15014
|
+
});
|
|
15015
|
+
}),
|
|
15016
|
+
...moduleMap ? [[import_node_path14.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
14623
15017
|
]) : Object.fromEntries(podHeaders.map((file) => [file, file]))
|
|
14624
15018
|
}
|
|
14625
15019
|
} : {}
|
|
@@ -14628,29 +15022,94 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14628
15022
|
};
|
|
14629
15023
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
14630
15024
|
const { settings, keys: settingKeys, module: module2 } = builtTargets.at(-1);
|
|
14631
|
-
const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => ref.target.
|
|
15025
|
+
const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
|
|
14632
15026
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
14633
15027
|
const podSourceDirs = frameworkTargets.flatMap(
|
|
14634
|
-
({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) =>
|
|
15028
|
+
({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => import_node_path14.default.dirname(file)).filter((dir) => import_node_fs13.default.existsSync(dir)) : []
|
|
14635
15029
|
);
|
|
14636
|
-
const expandValue = (value) => {
|
|
14637
|
-
if (typeof value === "string") return expand(value,
|
|
14638
|
-
if (Array.isArray(value)) return value.map(expandValue);
|
|
15030
|
+
const expandValue = (value, settings2) => {
|
|
15031
|
+
if (typeof value === "string") return expand(value, settings2);
|
|
15032
|
+
if (Array.isArray(value)) return value.map((item) => expandValue(item, settings2));
|
|
14639
15033
|
if (typeof value === "object" && !(value instanceof Date) && !Buffer.isBuffer(value)) {
|
|
14640
15034
|
return Object.fromEntries(
|
|
14641
|
-
Object.entries(value).map(([key, value2]) => [key, expandValue(value2)])
|
|
15035
|
+
Object.entries(value).map(([key, value2]) => [key, expandValue(value2, settings2)])
|
|
14642
15036
|
);
|
|
14643
15037
|
}
|
|
14644
15038
|
return value;
|
|
14645
15039
|
};
|
|
14646
|
-
const
|
|
15040
|
+
const resourceProducts = [];
|
|
15041
|
+
const bundleTargets = builtTargets.filter(
|
|
15042
|
+
({ ref }) => ref.target.productType === RESOURCE_BUNDLE
|
|
15043
|
+
);
|
|
15044
|
+
for (const owner of options.installedPods ? builtTargets : []) {
|
|
15045
|
+
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
15046
|
+
const phase = owner.ref.project.object(phaseId);
|
|
15047
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
15048
|
+
continue;
|
|
15049
|
+
const absolute = (raw) => import_node_path14.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
15050
|
+
const entries = (paths) => paths.flatMap((raw) => {
|
|
15051
|
+
const file = absolute(raw);
|
|
15052
|
+
xcconfigs.add(file);
|
|
15053
|
+
return fileListEntries(file, absolute);
|
|
15054
|
+
});
|
|
15055
|
+
const inputs = entries(list(phase.inputFileListPaths)).filter(
|
|
15056
|
+
(file) => file.endsWith(".bundle")
|
|
15057
|
+
);
|
|
15058
|
+
const outputs = entries(list(phase.outputFileListPaths)).filter(
|
|
15059
|
+
(file) => file.endsWith(".bundle")
|
|
15060
|
+
);
|
|
15061
|
+
if (inputs.length !== outputs.length)
|
|
15062
|
+
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
15063
|
+
const destinationRoot = import_node_path14.default.join(
|
|
15064
|
+
owner.settings("TARGET_BUILD_DIR"),
|
|
15065
|
+
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
15066
|
+
);
|
|
15067
|
+
for (const [index, input2] of inputs.entries()) {
|
|
15068
|
+
const product = bundleTargets.find((target) => {
|
|
15069
|
+
const file = str(
|
|
15070
|
+
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
15071
|
+
);
|
|
15072
|
+
return file && import_node_path14.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
15073
|
+
});
|
|
15074
|
+
if (!product)
|
|
15075
|
+
throw new Error(
|
|
15076
|
+
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
15077
|
+
);
|
|
15078
|
+
const destination = import_node_path14.default.relative(destinationRoot, outputs[index]);
|
|
15079
|
+
if (destination === ".." || destination.startsWith(`..${import_node_path14.default.sep}`) || import_node_path14.default.isAbsolute(destination) || import_node_path14.default.basename(input2) !== import_node_path14.default.basename(destination))
|
|
15080
|
+
throw new Error(
|
|
15081
|
+
`${owner.module.name}: invalid resource bundle copy destination`
|
|
15082
|
+
);
|
|
15083
|
+
const infoFile = import_node_path14.default.resolve(
|
|
15084
|
+
product.ref.project.projectDir,
|
|
15085
|
+
product.settings("INFOPLIST_FILE")
|
|
15086
|
+
);
|
|
15087
|
+
xcconfigs.add(infoFile);
|
|
15088
|
+
const parsed = import_plist3.default.parse(import_node_fs13.default.readFileSync(infoFile, "utf8"));
|
|
15089
|
+
const infoPlist = import_plist3.default.build(expandValue(parsed, product.settings));
|
|
15090
|
+
const prefix2 = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
15091
|
+
const bundlePath = prefix2 + destination.split(import_node_path14.default.sep).join("/");
|
|
15092
|
+
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
15093
|
+
throw new Error(
|
|
15094
|
+
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
15095
|
+
);
|
|
15096
|
+
resourceProducts.push({
|
|
15097
|
+
path: bundlePath,
|
|
15098
|
+
resources: product.module.resources,
|
|
15099
|
+
infoPlist
|
|
15100
|
+
});
|
|
15101
|
+
}
|
|
15102
|
+
}
|
|
15103
|
+
}
|
|
15104
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path14.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
14647
15105
|
const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
14648
|
-
const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(
|
|
15106
|
+
const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs13.default.readFileSync(infoPlistFile, "utf8")) : {};
|
|
14649
15107
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
14650
15108
|
throw new Error(`${module2.name} Info.plist must contain a dictionary`);
|
|
14651
15109
|
}
|
|
14652
15110
|
const info = {};
|
|
14653
|
-
for (const [key, value] of Object.entries(sourceInfo))
|
|
15111
|
+
for (const [key, value] of Object.entries(sourceInfo))
|
|
15112
|
+
info[key] = expandValue(value, settings);
|
|
14654
15113
|
for (const key of settingKeys) {
|
|
14655
15114
|
if (!key.startsWith("INFOPLIST_KEY_") || key.endsWith("_Generation")) continue;
|
|
14656
15115
|
const value = settings(key);
|
|
@@ -14673,7 +15132,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14673
15132
|
};
|
|
14674
15133
|
}
|
|
14675
15134
|
const localPackageDirs = [
|
|
14676
|
-
...listed.filter((reference) =>
|
|
15135
|
+
...listed.filter((reference) => import_node_fs13.default.existsSync(import_node_path14.default.join(reference, "Package.swift"))),
|
|
14677
15136
|
...projects.flatMap(
|
|
14678
15137
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
14679
15138
|
if (!isDict(entry)) return [];
|
|
@@ -14683,19 +15142,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14683
15142
|
const packages = [];
|
|
14684
15143
|
while (pending.length > 0) {
|
|
14685
15144
|
const dir = pending.pop();
|
|
14686
|
-
if (
|
|
15145
|
+
if (import_node_fs13.default.existsSync(import_node_path14.default.join(dir, "Package.swift"))) {
|
|
14687
15146
|
packages.push(dir);
|
|
14688
15147
|
continue;
|
|
14689
15148
|
}
|
|
14690
15149
|
if (!isDirectory(dir)) continue;
|
|
14691
|
-
for (const child of
|
|
15150
|
+
for (const child of import_node_fs13.default.readdirSync(dir, { withFileTypes: true }))
|
|
14692
15151
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
14693
|
-
pending.push(
|
|
15152
|
+
pending.push(import_node_path14.default.join(dir, child.name));
|
|
14694
15153
|
}
|
|
14695
15154
|
return packages;
|
|
14696
15155
|
}
|
|
14697
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
14698
|
-
return candidate &&
|
|
15156
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path14.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
15157
|
+
return candidate && import_node_fs13.default.existsSync(import_node_path14.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
14699
15158
|
})
|
|
14700
15159
|
)
|
|
14701
15160
|
];
|
|
@@ -14716,12 +15175,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14716
15175
|
const linkedProductKeys = /* @__PURE__ */ new Set();
|
|
14717
15176
|
const binaryFrameworks = /* @__PURE__ */ new Map();
|
|
14718
15177
|
for (const { ref, settings: settings2 } of builtTargets) {
|
|
14719
|
-
const absolute = (raw) =>
|
|
15178
|
+
const absolute = (raw) => import_node_path14.default.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
14720
15179
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
14721
15180
|
const dir = absolute(raw);
|
|
14722
|
-
const modulemap =
|
|
14723
|
-
if (!
|
|
14724
|
-
const name2 = moduleMapName(
|
|
15181
|
+
const modulemap = import_node_path14.default.join(dir, "module.modulemap");
|
|
15182
|
+
if (!import_node_fs13.default.existsSync(modulemap)) continue;
|
|
15183
|
+
const name2 = moduleMapName(import_node_fs13.default.readFileSync(modulemap, "utf8"));
|
|
14725
15184
|
if (name2 && !binaryFrameworks.has(name2)) binaryFrameworks.set(name2, dir);
|
|
14726
15185
|
}
|
|
14727
15186
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -14730,7 +15189,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14730
15189
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
14731
15190
|
for (const raw of list(phase.inputFileListPaths)) {
|
|
14732
15191
|
const file = absolute(raw);
|
|
14733
|
-
if (!
|
|
15192
|
+
if (!import_node_fs13.default.existsSync(file)) continue;
|
|
14734
15193
|
xcconfigs.add(file);
|
|
14735
15194
|
inputs.push(...fileListEntries(file, absolute));
|
|
14736
15195
|
}
|
|
@@ -14769,7 +15228,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14769
15228
|
product,
|
|
14770
15229
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
14771
15230
|
kind: "local",
|
|
14772
|
-
dir:
|
|
15231
|
+
dir: import_node_path14.default.resolve(
|
|
14773
15232
|
project.projectDir,
|
|
14774
15233
|
str(reference.relativePath) ?? ""
|
|
14775
15234
|
)
|
|
@@ -14792,11 +15251,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14792
15251
|
const fileId = str(project.object(buildFileId)?.fileRef);
|
|
14793
15252
|
const file = project.object(fileId);
|
|
14794
15253
|
const tree = str(file?.sourceTree);
|
|
14795
|
-
const
|
|
15254
|
+
const rawPath = str(file?.path) ?? "";
|
|
15255
|
+
const name2 = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
14796
15256
|
if (file?.isa !== "PBXFileReference" || !name2) continue;
|
|
14797
|
-
if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR"
|
|
15257
|
+
if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
|
|
15258
|
+
// however it is rooted: xcode links -framework <name> from the sdk
|
|
15259
|
+
// and a stale group-relative path to it contributes nothing.
|
|
15260
|
+
/\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
|
|
15261
|
+
byProduct.has(import_node_path14.default.basename(rawPath)))
|
|
14798
15262
|
continue;
|
|
14799
15263
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
15264
|
+
if (fileId && resolved !== null && !import_node_fs13.default.existsSync(resolved))
|
|
15265
|
+
throw new Error(
|
|
15266
|
+
`${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
15267
|
+
);
|
|
14800
15268
|
if (!binaryFrameworks.get(name2)) binaryFrameworks.set(name2, resolved);
|
|
14801
15269
|
}
|
|
14802
15270
|
}
|
|
@@ -14811,18 +15279,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14811
15279
|
}
|
|
14812
15280
|
for (const built of builtTargets)
|
|
14813
15281
|
built.module.packageProducts = productsByTarget.get(built.ref) ?? [];
|
|
14814
|
-
const resolvedFile =
|
|
14815
|
-
workspace ??
|
|
15282
|
+
const resolvedFile = import_node_path14.default.join(
|
|
15283
|
+
workspace ?? import_node_path14.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
14816
15284
|
"xcshareddata",
|
|
14817
15285
|
"swiftpm",
|
|
14818
15286
|
"Package.resolved"
|
|
14819
15287
|
);
|
|
14820
|
-
let packageResolved =
|
|
15288
|
+
let packageResolved = import_node_fs13.default.existsSync(resolvedFile) ? [import_node_fs13.default.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path14.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs13.default.existsSync(file)).map((file) => import_node_fs13.default.realpathSync(file)).sort();
|
|
14821
15289
|
if (packageResolved.length === 0) {
|
|
14822
15290
|
const requirements = remotePackageRequirements(projects);
|
|
14823
15291
|
if (requirements.length > 0) {
|
|
14824
15292
|
resolveSwiftPackageRequirements(requirements, resolvedFile);
|
|
14825
|
-
packageResolved = [
|
|
15293
|
+
packageResolved = [import_node_fs13.default.realpathSync(resolvedFile)];
|
|
14826
15294
|
}
|
|
14827
15295
|
}
|
|
14828
15296
|
const used = order.map((ref) => ref.project);
|
|
@@ -14830,14 +15298,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14830
15298
|
...module2,
|
|
14831
15299
|
rootDir: commonAncestor(
|
|
14832
15300
|
[
|
|
14833
|
-
workspace ?
|
|
15301
|
+
workspace ? import_node_path14.default.dirname(workspace) : app.project.projectDir,
|
|
14834
15302
|
...used.map((project) => project.projectDir),
|
|
14835
15303
|
...localPackageDirs,
|
|
14836
15304
|
...linkedProducts.flatMap(
|
|
14837
|
-
({ source }) => source.kind === "local" &&
|
|
15305
|
+
({ source }) => source.kind === "local" && import_node_fs13.default.existsSync(source.dir) ? [source.dir] : []
|
|
14838
15306
|
),
|
|
14839
15307
|
...new Set(podSourceDirs)
|
|
14840
|
-
].map((dir) =>
|
|
15308
|
+
].map((dir) => import_node_fs13.default.realpathSync(dir))
|
|
14841
15309
|
),
|
|
14842
15310
|
projectFiles: [
|
|
14843
15311
|
.../* @__PURE__ */ new Set([
|
|
@@ -14850,10 +15318,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
14850
15318
|
appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
|
|
14851
15319
|
infoPlist: infoPlistPending ? null : import_plist3.default.build(info),
|
|
14852
15320
|
infoPlistFile,
|
|
15321
|
+
developmentRegion: str(app.project.project.developmentRegion) ?? "en",
|
|
14853
15322
|
frameworks,
|
|
15323
|
+
resourceProducts,
|
|
14854
15324
|
linkedProducts,
|
|
14855
15325
|
localPackageDirs: [
|
|
14856
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
15326
|
+
...new Set(localPackageDirs.map((dir) => import_node_fs13.default.realpathSync(dir)))
|
|
14857
15327
|
].sort(),
|
|
14858
15328
|
binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
14859
15329
|
packageResolved,
|
|
@@ -14932,7 +15402,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
14932
15402
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
|
|
14933
15403
|
const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
|
|
14934
15404
|
const rootModuleName = readRootModuleName(
|
|
14935
|
-
app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) &&
|
|
15405
|
+
app.allSources.filter((file) => /\.(?:swift|mm|m)$/.test(file) && import_node_fs14.default.existsSync(file)).map((file) => import_node_fs14.default.readFileSync(file, "utf8"))
|
|
14936
15406
|
);
|
|
14937
15407
|
return {
|
|
14938
15408
|
applicationName,
|
|
@@ -14953,7 +15423,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
14953
15423
|
googleSignIn: readGoogleSignInConfiguration(
|
|
14954
15424
|
dictionary,
|
|
14955
15425
|
Object.fromEntries(
|
|
14956
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(
|
|
15426
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs14.default.readFileSync(file, "utf8"))])
|
|
14957
15427
|
)
|
|
14958
15428
|
),
|
|
14959
15429
|
supportedInterfaceOrientations,
|
|
@@ -14962,11 +15432,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
14962
15432
|
alternateIconNames: [...alternateIconNames],
|
|
14963
15433
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
14964
15434
|
app.resources,
|
|
14965
|
-
(file) =>
|
|
15435
|
+
(file) => import_node_fs14.default.readFileSync(file, "utf8"),
|
|
14966
15436
|
(file) => {
|
|
14967
|
-
const extension =
|
|
15437
|
+
const extension = import_node_path15.default.extname(file).toLowerCase();
|
|
14968
15438
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
14969
|
-
return `data:${contentType};base64,${
|
|
15439
|
+
return `data:${contentType};base64,${import_node_fs14.default.readFileSync(file).toString("base64")}`;
|
|
14970
15440
|
},
|
|
14971
15441
|
icons,
|
|
14972
15442
|
app.appIconName,
|
|
@@ -14986,10 +15456,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
14986
15456
|
}
|
|
14987
15457
|
var NativeAppTargetSelectionError = class extends Error {
|
|
14988
15458
|
};
|
|
14989
|
-
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest) {
|
|
15459
|
+
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
|
|
14990
15460
|
const read = selectNativeAppIdentityReader(platform, {
|
|
14991
15461
|
android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
|
|
14992
|
-
ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget)
|
|
15462
|
+
ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment)
|
|
14993
15463
|
});
|
|
14994
15464
|
return read ? read() : null;
|
|
14995
15465
|
}
|
|
@@ -14997,22 +15467,22 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
14997
15467
|
const read = selectNativeAppIdentityReader(platform, {
|
|
14998
15468
|
android: () => null,
|
|
14999
15469
|
ios: () => {
|
|
15000
|
-
const iosRoot =
|
|
15001
|
-
if (!
|
|
15470
|
+
const iosRoot = import_node_path15.default.join(projectRoot, "ios");
|
|
15471
|
+
if (!import_node_fs14.default.existsSync(iosRoot)) return null;
|
|
15002
15472
|
const files = {};
|
|
15003
|
-
for (const entry of
|
|
15473
|
+
for (const entry of import_node_fs14.default.readdirSync(iosRoot, { withFileTypes: true })) {
|
|
15004
15474
|
if (entry.name === "Pods") continue;
|
|
15005
15475
|
if (entry.isDirectory()) {
|
|
15006
15476
|
const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : ["Info.plist", "AppDelegate.swift", "AppDelegate.mm", "AppDelegate.m"];
|
|
15007
15477
|
for (const name2 of names) {
|
|
15008
15478
|
const relative3 = `ios/${entry.name}/${name2}`;
|
|
15009
|
-
const file =
|
|
15010
|
-
if (
|
|
15479
|
+
const file = import_node_path15.default.join(projectRoot, relative3);
|
|
15480
|
+
if (import_node_fs14.default.existsSync(file)) files[relative3] = import_node_fs14.default.readFileSync(file, "utf8");
|
|
15011
15481
|
}
|
|
15012
15482
|
} else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
|
|
15013
15483
|
const relative3 = `ios/${entry.name}`;
|
|
15014
|
-
const file =
|
|
15015
|
-
if (
|
|
15484
|
+
const file = import_node_path15.default.join(projectRoot, relative3);
|
|
15485
|
+
if (import_node_fs14.default.existsSync(file)) files[relative3] = import_node_fs14.default.readFileSync(file, "utf8");
|
|
15016
15486
|
}
|
|
15017
15487
|
}
|
|
15018
15488
|
return extractNativeAppIdentityFromFiles(files, "ios", parseInfoPlist, iosTarget);
|
|
@@ -15023,41 +15493,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
15023
15493
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
15024
15494
|
const files = {};
|
|
15025
15495
|
if (androidMergedManifest) {
|
|
15026
|
-
const file =
|
|
15027
|
-
if (!
|
|
15028
|
-
files[androidMergedManifest] =
|
|
15496
|
+
const file = import_node_path15.default.resolve(projectRoot, androidMergedManifest);
|
|
15497
|
+
if (!import_node_fs14.default.existsSync(file)) return null;
|
|
15498
|
+
files[androidMergedManifest] = import_node_fs14.default.readFileSync(file, "utf8");
|
|
15029
15499
|
} else {
|
|
15030
|
-
const androidRoot =
|
|
15031
|
-
if (!
|
|
15500
|
+
const androidRoot = import_node_path15.default.join(projectRoot, "android");
|
|
15501
|
+
if (!import_node_fs14.default.existsSync(androidRoot)) return null;
|
|
15032
15502
|
const collect = (directory) => {
|
|
15033
|
-
for (const entry of
|
|
15034
|
-
const file =
|
|
15503
|
+
for (const entry of import_node_fs14.default.readdirSync(directory, { withFileTypes: true })) {
|
|
15504
|
+
const file = import_node_path15.default.join(directory, entry.name);
|
|
15035
15505
|
if (entry.isDirectory()) collect(file);
|
|
15036
15506
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
15037
|
-
files[
|
|
15507
|
+
files[import_node_path15.default.relative(projectRoot, file).split(import_node_path15.default.sep).join("/")] = import_node_fs14.default.readFileSync(file, "utf8");
|
|
15038
15508
|
}
|
|
15039
15509
|
};
|
|
15040
|
-
for (const module2 of
|
|
15510
|
+
for (const module2 of import_node_fs14.default.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
15041
15511
|
if (!module2.isDirectory()) continue;
|
|
15042
|
-
const outputs =
|
|
15512
|
+
const outputs = import_node_path15.default.join(
|
|
15043
15513
|
androidRoot,
|
|
15044
15514
|
module2.name,
|
|
15045
15515
|
"build/intermediates/merged_manifests"
|
|
15046
15516
|
);
|
|
15047
|
-
if (
|
|
15517
|
+
if (import_node_fs14.default.existsSync(outputs)) collect(outputs);
|
|
15048
15518
|
}
|
|
15049
15519
|
}
|
|
15050
15520
|
for (const manifest of Object.keys(files)) {
|
|
15051
15521
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
15052
15522
|
if (!resourceDirectory) continue;
|
|
15053
|
-
const absolute =
|
|
15054
|
-
if (!
|
|
15055
|
-
for (const entry of
|
|
15523
|
+
const absolute = import_node_path15.default.resolve(projectRoot, resourceDirectory);
|
|
15524
|
+
if (!import_node_fs14.default.existsSync(absolute)) continue;
|
|
15525
|
+
for (const entry of import_node_fs14.default.readdirSync(absolute, { withFileTypes: true })) {
|
|
15056
15526
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
15057
|
-
for (const resource of
|
|
15527
|
+
for (const resource of import_node_fs14.default.readdirSync(import_node_path15.default.join(absolute, entry.name))) {
|
|
15058
15528
|
if (!resource.endsWith(".xml")) continue;
|
|
15059
15529
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
15060
|
-
files[file] =
|
|
15530
|
+
files[file] = import_node_fs14.default.readFileSync(import_node_path15.default.resolve(projectRoot, file), "utf8");
|
|
15061
15531
|
}
|
|
15062
15532
|
}
|
|
15063
15533
|
}
|
|
@@ -15070,11 +15540,11 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
|
15070
15540
|
androidMergedManifest
|
|
15071
15541
|
);
|
|
15072
15542
|
}
|
|
15073
|
-
function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
15074
|
-
const app = readIosAppTarget(projectRoot, iosTarget);
|
|
15543
|
+
function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment) {
|
|
15544
|
+
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
15075
15545
|
if (!app) return null;
|
|
15076
15546
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
15077
|
-
const projectManifestPath =
|
|
15547
|
+
const projectManifestPath = import_node_path15.default.join(projectRoot, "package.json");
|
|
15078
15548
|
const projectRequire = (0, import_node_module3.createRequire)(projectManifestPath);
|
|
15079
15549
|
let reanimatedManifestPath;
|
|
15080
15550
|
try {
|
|
@@ -15088,22 +15558,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
|
15088
15558
|
throw error;
|
|
15089
15559
|
}
|
|
15090
15560
|
const installedManifest = JSON.parse(
|
|
15091
|
-
|
|
15561
|
+
import_node_fs14.default.readFileSync(reanimatedManifestPath, "utf8")
|
|
15092
15562
|
);
|
|
15093
15563
|
const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
15094
15564
|
if (!installedVersion) throw new Error("Reanimated package version is malformed");
|
|
15095
15565
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
15096
15566
|
const defaults = JSON.parse(
|
|
15097
|
-
|
|
15098
|
-
|
|
15099
|
-
|
|
15567
|
+
import_node_fs14.default.readFileSync(
|
|
15568
|
+
import_node_path15.default.join(
|
|
15569
|
+
import_node_path15.default.dirname(reanimatedManifestPath),
|
|
15100
15570
|
"src/featureFlags/staticFlags.json"
|
|
15101
15571
|
),
|
|
15102
15572
|
"utf8"
|
|
15103
15573
|
)
|
|
15104
15574
|
);
|
|
15105
15575
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
15106
|
-
const manifest = JSON.parse(
|
|
15576
|
+
const manifest = JSON.parse(import_node_fs14.default.readFileSync(projectManifestPath, "utf8"));
|
|
15107
15577
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
15108
15578
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
15109
15579
|
if (overrides !== void 0 && !isRecord(overrides)) {
|
|
@@ -15125,10 +15595,10 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
|
15125
15595
|
}
|
|
15126
15596
|
return { ...identity, reanimatedStaticFeatureFlags: flags };
|
|
15127
15597
|
}
|
|
15128
|
-
function readIosAppTarget(projectRoot, iosTarget) {
|
|
15129
|
-
const iosRoot =
|
|
15130
|
-
if (!
|
|
15131
|
-
const projects =
|
|
15598
|
+
function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
15599
|
+
const iosRoot = import_node_path15.default.join(projectRoot, "ios");
|
|
15600
|
+
if (!import_node_fs14.default.existsSync(iosRoot)) return null;
|
|
15601
|
+
const projects = import_node_fs14.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
15132
15602
|
if (projects.length === 0) return null;
|
|
15133
15603
|
if (projects.length > 1 && !iosTarget) {
|
|
15134
15604
|
throw new NativeAppTargetSelectionError(
|
|
@@ -15138,7 +15608,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
15138
15608
|
let project = projects[0];
|
|
15139
15609
|
if (iosTarget && projects.length > 1) {
|
|
15140
15610
|
const matches = projects.filter(
|
|
15141
|
-
(entry) => listXcodeAppTargets(
|
|
15611
|
+
(entry) => listXcodeAppTargets(import_node_path15.default.join(iosRoot, entry.name), {
|
|
15142
15612
|
requireSources: false
|
|
15143
15613
|
}).includes(iosTarget)
|
|
15144
15614
|
);
|
|
@@ -15152,7 +15622,7 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
15152
15622
|
}
|
|
15153
15623
|
project = matches[0];
|
|
15154
15624
|
}
|
|
15155
|
-
const xcodeproj =
|
|
15625
|
+
const xcodeproj = import_node_path15.default.join(iosRoot, project.name);
|
|
15156
15626
|
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
15157
15627
|
if (!iosTarget && appTargets.length > 1) {
|
|
15158
15628
|
throw new NativeAppTargetSelectionError(
|
|
@@ -15161,33 +15631,42 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
15161
15631
|
}
|
|
15162
15632
|
return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
|
|
15163
15633
|
requireSources: false,
|
|
15164
|
-
prepareGeneratedSources: true
|
|
15634
|
+
prepareGeneratedSources: true,
|
|
15635
|
+
environment
|
|
15165
15636
|
});
|
|
15166
15637
|
}
|
|
15167
15638
|
|
|
15168
15639
|
// src/native-firebase-config.ts
|
|
15169
15640
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
15170
15641
|
var import_node_child_process4 = require("node:child_process");
|
|
15171
|
-
var
|
|
15642
|
+
var import_node_fs15 = __toESM(require("node:fs"), 1);
|
|
15172
15643
|
var import_node_os5 = __toESM(require("node:os"), 1);
|
|
15173
|
-
var
|
|
15644
|
+
var import_node_path16 = __toESM(require("node:path"), 1);
|
|
15174
15645
|
init_is_record();
|
|
15175
15646
|
var EXPO_CONFIG_SCRIPT = `const { createRequire } = require('node:module');
|
|
15176
15647
|
const { writeFileSync } = require('node:fs');
|
|
15177
15648
|
const { join } = require('node:path');
|
|
15178
15649
|
const root = process.argv[1];
|
|
15179
|
-
const
|
|
15650
|
+
const projectRequire = createRequire(join(root, 'package.json'));
|
|
15651
|
+
const expoRequire = createRequire(projectRequire.resolve('expo/package.json'));
|
|
15652
|
+
const { getConfig } = expoRequire('@expo/config');
|
|
15653
|
+
let expoEnv = null;
|
|
15654
|
+
try { expoEnv = createRequire(expoRequire.resolve('@expo/cli/package.json'))('@expo/env'); } catch {}
|
|
15655
|
+
if (expoEnv) {
|
|
15656
|
+
process.env.NODE_ENV ||= 'development';
|
|
15657
|
+
expoEnv.load(root, { silent: true });
|
|
15658
|
+
}
|
|
15180
15659
|
const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true }).exp);
|
|
15181
15660
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
15182
15661
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
15183
15662
|
function hasExpoConfig(projectRoot) {
|
|
15184
|
-
const appJsonPath =
|
|
15185
|
-
const appJson =
|
|
15663
|
+
const appJsonPath = import_node_path16.default.join(projectRoot, "app.json");
|
|
15664
|
+
const appJson = import_node_fs15.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs15.default.readFileSync(appJsonPath, "utf8")) : null;
|
|
15186
15665
|
const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
15187
15666
|
(value) => isRecord(value) && typeof value.googleServicesFile === "string"
|
|
15188
15667
|
));
|
|
15189
15668
|
return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
|
|
15190
|
-
(name2) =>
|
|
15669
|
+
(name2) => import_node_fs15.default.existsSync(import_node_path16.default.join(projectRoot, name2))
|
|
15191
15670
|
);
|
|
15192
15671
|
}
|
|
15193
15672
|
function expoConfigArgs(projectRoot, resultPath) {
|
|
@@ -15195,22 +15674,22 @@ function expoConfigArgs(projectRoot, resultPath) {
|
|
|
15195
15674
|
"--input-type=commonjs",
|
|
15196
15675
|
"-e",
|
|
15197
15676
|
EXPO_CONFIG_SCRIPT,
|
|
15198
|
-
|
|
15677
|
+
import_node_path16.default.resolve(projectRoot),
|
|
15199
15678
|
resultPath
|
|
15200
15679
|
];
|
|
15201
15680
|
}
|
|
15202
15681
|
function readExpoConfigResult(resultPath, status, stderr) {
|
|
15203
15682
|
if (status !== 0)
|
|
15204
15683
|
throw new Error(stderr || "Expo native configuration evaluation failed.");
|
|
15205
|
-
const resolved = JSON.parse(
|
|
15684
|
+
const resolved = JSON.parse(import_node_fs15.default.readFileSync(resultPath, "utf8"));
|
|
15206
15685
|
if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
|
|
15207
15686
|
return resolved;
|
|
15208
15687
|
}
|
|
15209
|
-
var resultDirectory = () =>
|
|
15688
|
+
var resultDirectory = () => import_node_fs15.default.mkdtempSync(import_node_path16.default.join(import_node_os5.default.tmpdir(), "peach-expo-config-"));
|
|
15210
15689
|
function readExpoConfig(projectRoot) {
|
|
15211
15690
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
15212
15691
|
const directory = resultDirectory();
|
|
15213
|
-
const resultPath =
|
|
15692
|
+
const resultPath = import_node_path16.default.join(directory, "config.json");
|
|
15214
15693
|
try {
|
|
15215
15694
|
const child = (0, import_node_child_process4.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
15216
15695
|
cwd: projectRoot,
|
|
@@ -15222,7 +15701,7 @@ function readExpoConfig(projectRoot) {
|
|
|
15222
15701
|
if (child.error) throw child.error;
|
|
15223
15702
|
return readExpoConfigResult(resultPath, child.status, child.stderr);
|
|
15224
15703
|
} finally {
|
|
15225
|
-
|
|
15704
|
+
import_node_fs15.default.rmSync(directory, { recursive: true, force: true });
|
|
15226
15705
|
}
|
|
15227
15706
|
}
|
|
15228
15707
|
function evaluateFirebaseGuard(header, resources) {
|
|
@@ -15244,7 +15723,7 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
15244
15723
|
}
|
|
15245
15724
|
clauses.push(condition.slice(start).trim());
|
|
15246
15725
|
const sources = resources.filter(
|
|
15247
|
-
(file) =>
|
|
15726
|
+
(file) => import_node_path16.default.basename(file) === "GoogleService-Info.plist"
|
|
15248
15727
|
);
|
|
15249
15728
|
const bound = /* @__PURE__ */ new Map();
|
|
15250
15729
|
for (const clause of clauses) {
|
|
@@ -15260,7 +15739,7 @@ function evaluateFirebaseGuard(header, resources) {
|
|
|
15260
15739
|
const dictionary = /^let\s+(\w+)\s*=\s*NSDictionary\s*\(\s*contentsOfFile:\s*(\w+)\s*\)$/.exec(clause);
|
|
15261
15740
|
if (dictionary && typeof bound.get(dictionary[2]) === "string") {
|
|
15262
15741
|
const parsed = parsePlistSource(
|
|
15263
|
-
|
|
15742
|
+
import_node_fs15.default.readFileSync(String(bound.get(dictionary[2])), "utf8")
|
|
15264
15743
|
);
|
|
15265
15744
|
if (!isRecord(parsed)) return false;
|
|
15266
15745
|
bound.set(dictionary[1], parsed);
|
|
@@ -15342,7 +15821,7 @@ function findDefaultConfigureCall(body, sources) {
|
|
|
15342
15821
|
const [, type, name2] = call;
|
|
15343
15822
|
for (const file of sources) {
|
|
15344
15823
|
if (!file.endsWith(".swift")) continue;
|
|
15345
|
-
const source = blankSwiftObjcLiterals(
|
|
15824
|
+
const source = blankSwiftObjcLiterals(import_node_fs15.default.readFileSync(file, "utf8"));
|
|
15346
15825
|
const declaration = new RegExp(
|
|
15347
15826
|
`\\b(?:enum|struct|class)\\s+${type}\\b[^{]*\\{`
|
|
15348
15827
|
).exec(source);
|
|
@@ -15364,10 +15843,10 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
15364
15843
|
prepareGeneratedSources
|
|
15365
15844
|
});
|
|
15366
15845
|
const delegates = app.allSources.filter(
|
|
15367
|
-
(file) => /^AppDelegate\.(swift|mm|m)$/.test(
|
|
15846
|
+
(file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path16.default.basename(file))
|
|
15368
15847
|
);
|
|
15369
15848
|
const defaultConfigured = delegates.some((file) => {
|
|
15370
|
-
const raw =
|
|
15849
|
+
const raw = import_node_fs15.default.readFileSync(file, "utf8");
|
|
15371
15850
|
const source = blankSwiftObjcLiterals(raw);
|
|
15372
15851
|
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(
|
|
15373
15852
|
source
|
|
@@ -15432,17 +15911,17 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
15432
15911
|
return guarded;
|
|
15433
15912
|
});
|
|
15434
15913
|
if (!defaultConfigured) return null;
|
|
15435
|
-
const bundle =
|
|
15914
|
+
const bundle = import_node_path16.default.join(
|
|
15436
15915
|
app.settings("BUILT_PRODUCTS_DIR"),
|
|
15437
15916
|
app.settings("WRAPPER_NAME") || `${app.settings("PRODUCT_NAME")}.app`
|
|
15438
15917
|
);
|
|
15439
15918
|
const staged = app.copiedFiles.filter(
|
|
15440
|
-
({ from, to }) => to ===
|
|
15441
|
-
).map(({ from }) =>
|
|
15919
|
+
({ from, to }) => to === import_node_path16.default.join(bundle, "GoogleService-Info.plist") && import_node_fs15.default.existsSync(from)
|
|
15920
|
+
).map(({ from }) => import_node_fs15.default.realpathSync(from));
|
|
15442
15921
|
const resources = [
|
|
15443
15922
|
.../* @__PURE__ */ new Set([
|
|
15444
15923
|
...app.resources.filter(
|
|
15445
|
-
(file) => /^GoogleService-Info\.plist$/.test(
|
|
15924
|
+
(file) => /^GoogleService-Info\.plist$/.test(import_node_path16.default.basename(file))
|
|
15446
15925
|
),
|
|
15447
15926
|
...staged
|
|
15448
15927
|
])
|
|
@@ -15451,21 +15930,21 @@ function readTargetGoogleServicesFile(projectRoot, xcodeproj, target, prepareGen
|
|
|
15451
15930
|
throw new Error(
|
|
15452
15931
|
"native Firebase default initialization requires one GoogleService-Info.plist build resource"
|
|
15453
15932
|
);
|
|
15454
|
-
return
|
|
15933
|
+
return import_node_path16.default.relative(import_node_fs15.default.realpathSync(projectRoot), resources[0]);
|
|
15455
15934
|
}
|
|
15456
15935
|
function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], iosTarget, config = readExpoConfig(projectRoot), prepareGeneratedSources = false) {
|
|
15457
15936
|
const result = {};
|
|
15458
15937
|
const ios = config.ios;
|
|
15459
15938
|
if (platforms.includes("ios") && (!isRecord(ios) || typeof ios.googleServicesFile !== "string")) {
|
|
15460
|
-
const iosRoot =
|
|
15461
|
-
if (
|
|
15462
|
-
const projects =
|
|
15939
|
+
const iosRoot = import_node_path16.default.join(projectRoot, "ios");
|
|
15940
|
+
if (import_node_fs15.default.existsSync(iosRoot)) {
|
|
15941
|
+
const projects = import_node_fs15.default.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
15463
15942
|
if (projects.length > 1)
|
|
15464
15943
|
throw new Error(
|
|
15465
15944
|
`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(", ")}`
|
|
15466
15945
|
);
|
|
15467
15946
|
if (projects.length === 1) {
|
|
15468
|
-
const xcodeproj =
|
|
15947
|
+
const xcodeproj = import_node_path16.default.join(iosRoot, projects[0].name);
|
|
15469
15948
|
const appTargets = listXcodeAppTargets(xcodeproj, { requireSources: false });
|
|
15470
15949
|
const bundleId = isRecord(ios) && typeof ios.bundleIdentifier === "string" ? ios.bundleIdentifier : null;
|
|
15471
15950
|
const matching = bundleId ? appTargets.filter(
|
|
@@ -15497,8 +15976,8 @@ function readNativeFirebaseConfig(projectRoot, platforms = ["ios", "android"], i
|
|
|
15497
15976
|
const native = config[platform];
|
|
15498
15977
|
if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
|
|
15499
15978
|
try {
|
|
15500
|
-
const source =
|
|
15501
|
-
|
|
15979
|
+
const source = import_node_fs15.default.readFileSync(
|
|
15980
|
+
import_node_path16.default.resolve(projectRoot, native.googleServicesFile),
|
|
15502
15981
|
"utf8"
|
|
15503
15982
|
);
|
|
15504
15983
|
const parsed = platform === "ios" ? parsePlistSource(source) : JSON.parse(source);
|
|
@@ -15766,7 +16245,7 @@ function withPeach(config, options = {}) {
|
|
|
15766
16245
|
const configuredBundleUrl = "/index.bundle?platform=ios&dev=true&hot=true&minify=false";
|
|
15767
16246
|
const cfgServer = config.server;
|
|
15768
16247
|
const port = resolveMetroPort(cfgServer);
|
|
15769
|
-
const metroServerId = (0,
|
|
16248
|
+
const metroServerId = (0, import_node_crypto5.randomUUID)();
|
|
15770
16249
|
const bundleUrl = tagRnxBundleForPlugin(
|
|
15771
16250
|
configuredBundleUrl,
|
|
15772
16251
|
`http://localhost:${port}`,
|