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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1728 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -29,8 +29,10 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
29
29
|
));
|
|
30
30
|
|
|
31
31
|
// <define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>
|
|
32
|
+
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
32
33
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
33
34
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
35
|
+
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" };
|
|
34
36
|
}
|
|
35
37
|
});
|
|
36
38
|
|
|
@@ -1292,6 +1294,13 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1292
1294
|
...max === void 0 ? {} : { maxSdkVersion: Number(max) }
|
|
1293
1295
|
});
|
|
1294
1296
|
}
|
|
1297
|
+
let androidPhotoLibraryAddOnly;
|
|
1298
|
+
for (const element of application.children) {
|
|
1299
|
+
if (element.name !== "meta-data" || element.attributes[`${attribute}name`] !== "one.photoLibrary.addOnly")
|
|
1300
|
+
continue;
|
|
1301
|
+
if (/^(?:true|True|TRUE)$/.test(element.attributes[`${attribute}value`]?.trim() ?? ""))
|
|
1302
|
+
androidPhotoLibraryAddOnly = true;
|
|
1303
|
+
}
|
|
1295
1304
|
let label = application.attributes[`${attribute}label`];
|
|
1296
1305
|
let applicationName = null;
|
|
1297
1306
|
if (label && !/\$\{|^[@?]/.test(label)) applicationName = label;
|
|
@@ -1330,7 +1339,8 @@ function nativeAppIdentityFromAndroidManifest(source, file, files = {}) {
|
|
|
1330
1339
|
buildVersion,
|
|
1331
1340
|
bundleIdentifier,
|
|
1332
1341
|
platform: "android",
|
|
1333
|
-
androidManifestPermissions
|
|
1342
|
+
androidManifestPermissions,
|
|
1343
|
+
...androidPhotoLibraryAddOnly === void 0 ? {} : { androidPhotoLibraryAddOnly }
|
|
1334
1344
|
};
|
|
1335
1345
|
}
|
|
1336
1346
|
function androidMergedResourceValuesDirectory(manifestFile) {
|
|
@@ -1534,7 +1544,7 @@ function parseOpenStepPlist(text2) {
|
|
|
1534
1544
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1535
1545
|
var NEVER_MEMBER = /(?:^|\/)(?:Info\.plist|[^/]+\.entitlements|[^/]+\.xcconfig|\.DS_Store)$/;
|
|
1536
1546
|
var BUNDLE_DIR = /\.(xcassets|bundle|lproj|xcdatamodeld|scnassets|spriteatlas|rcproject|storyboardc|icon)$/;
|
|
1537
|
-
function xcodePathResolver(objects, projectDir,
|
|
1547
|
+
function xcodePathResolver(objects, projectDir, join4) {
|
|
1538
1548
|
const parents = /* @__PURE__ */ new Map();
|
|
1539
1549
|
for (const [id, entry] of Object.entries(objects)) {
|
|
1540
1550
|
if (!isDict(entry)) continue;
|
|
@@ -1552,11 +1562,11 @@ function xcodePathResolver(objects, projectDir, join2) {
|
|
|
1552
1562
|
const own = str(entry.path) ?? "";
|
|
1553
1563
|
const tree = str(entry.sourceTree) ?? "<group>";
|
|
1554
1564
|
if (tree === "<absolute>") result = own;
|
|
1555
|
-
else if (tree === "SOURCE_ROOT") result =
|
|
1565
|
+
else if (tree === "SOURCE_ROOT") result = join4(projectDir, own);
|
|
1556
1566
|
else if (tree === "<group>") {
|
|
1557
1567
|
const parent = parents.get(id);
|
|
1558
1568
|
const base = parent ? resolve(parent) : projectDir;
|
|
1559
|
-
if (base !== null) result =
|
|
1569
|
+
if (base !== null) result = join4(base, own);
|
|
1560
1570
|
}
|
|
1561
1571
|
}
|
|
1562
1572
|
paths.set(id, result);
|
|
@@ -1564,7 +1574,7 @@ function xcodePathResolver(objects, projectDir, join2) {
|
|
|
1564
1574
|
};
|
|
1565
1575
|
return resolve;
|
|
1566
1576
|
}
|
|
1567
|
-
function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder,
|
|
1577
|
+
function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, join4, visit) {
|
|
1568
1578
|
const target = objects[targetId];
|
|
1569
1579
|
if (!isDict(target)) return;
|
|
1570
1580
|
for (const phaseId of list(target.buildPhases)) {
|
|
@@ -1600,7 +1610,7 @@ function visitXcodeTargetMembers(objects, targetId, resolvePath, filesUnder, joi
|
|
|
1600
1610
|
for (const relative2 of list(exception.membershipExceptions))
|
|
1601
1611
|
exceptions.add(relative2);
|
|
1602
1612
|
}
|
|
1603
|
-
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative2) => filesUnder(
|
|
1613
|
+
const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative2) => filesUnder(join4(folder, relative2)));
|
|
1604
1614
|
for (const file of members) {
|
|
1605
1615
|
const relative2 = file.slice(prefix.length);
|
|
1606
1616
|
const excepted = [...exceptions].some(
|
|
@@ -1976,7 +1986,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1976
1986
|
if (resourceUri) {
|
|
1977
1987
|
if (!selectedTarget)
|
|
1978
1988
|
throw new Error("native app icon target membership is unresolved");
|
|
1979
|
-
const
|
|
1989
|
+
const join4 = (base, own) => {
|
|
1980
1990
|
const segments = [];
|
|
1981
1991
|
for (const segment of `${base}/${own}`.split("/")) {
|
|
1982
1992
|
if (segment === "" || segment === ".") continue;
|
|
@@ -1989,7 +1999,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1989
1999
|
const project = Object.values(objects).find(
|
|
1990
2000
|
(object) => isRecord(object) && object.isa === "PBXProject"
|
|
1991
2001
|
);
|
|
1992
|
-
const projectDir =
|
|
2002
|
+
const projectDir = join4(
|
|
1993
2003
|
pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
|
|
1994
2004
|
isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
|
|
1995
2005
|
);
|
|
@@ -1997,7 +2007,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1997
2007
|
visitXcodeTargetMembers(
|
|
1998
2008
|
objects,
|
|
1999
2009
|
selectedTarget.id,
|
|
2000
|
-
xcodePathResolver(objects, projectDir,
|
|
2010
|
+
xcodePathResolver(objects, projectDir, join4),
|
|
2001
2011
|
(file) => {
|
|
2002
2012
|
if (Object.hasOwn(files, file)) return [file];
|
|
2003
2013
|
const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
@@ -2005,7 +2015,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2005
2015
|
(path7) => path7.startsWith(prefix) && !/(?:^|\/)\./.test(path7.slice(prefix.length))
|
|
2006
2016
|
);
|
|
2007
2017
|
},
|
|
2008
|
-
|
|
2018
|
+
join4,
|
|
2009
2019
|
(file, kind) => {
|
|
2010
2020
|
if (kind === "resource") resources.add(file);
|
|
2011
2021
|
}
|
|
@@ -2106,31 +2116,219 @@ function parsePlistSource(source) {
|
|
|
2106
2116
|
|
|
2107
2117
|
// src/xcode-project.ts
|
|
2108
2118
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2109
|
-
import { execFileSync as
|
|
2110
|
-
import { createHash as
|
|
2119
|
+
import { execFileSync as execFileSync3 } from "node:child_process";
|
|
2120
|
+
import { createHash as createHash5 } from "node:crypto";
|
|
2111
2121
|
import fs4 from "node:fs";
|
|
2112
2122
|
import path5 from "node:path";
|
|
2113
2123
|
import plist2 from "plist";
|
|
2114
2124
|
|
|
2115
2125
|
// src/swift-coverage/xcode-assets.ts
|
|
2116
2126
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2117
|
-
import {
|
|
2127
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
2128
|
+
import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync, writeFileSync } from "node:fs";
|
|
2129
|
+
import { join as join3, relative, sep } from "node:path";
|
|
2130
|
+
|
|
2131
|
+
// src/swift-coverage/provenance.ts
|
|
2132
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2118
2133
|
import { createHash } from "node:crypto";
|
|
2119
|
-
import {
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
"
|
|
2131
|
-
"
|
|
2132
|
-
"
|
|
2133
|
-
"
|
|
2134
|
+
import { readFileSync } from "node:fs";
|
|
2135
|
+
import { join } from "node:path";
|
|
2136
|
+
var SWIFT_COVERAGE_DIGEST_SOURCES = [
|
|
2137
|
+
"swift-coverage/indexdump.ts",
|
|
2138
|
+
"swift-coverage/indexing.ts",
|
|
2139
|
+
"swift-coverage/types.ts",
|
|
2140
|
+
"swift-coverage/source.ts",
|
|
2141
|
+
"swift-coverage/package.ts",
|
|
2142
|
+
"swift-coverage/xcode.ts",
|
|
2143
|
+
"swift-coverage/xcode-assets.ts",
|
|
2144
|
+
"swift-coverage/xcode-asset-symbols.ts",
|
|
2145
|
+
"swift-coverage/xcode-bridging.ts",
|
|
2146
|
+
"swift-coverage/xcode-packages.ts",
|
|
2147
|
+
"swift-coverage/xcode-strings.ts",
|
|
2148
|
+
"swift-coverage/reader.ts",
|
|
2149
|
+
"swift-coverage/provenance.ts",
|
|
2150
|
+
"swift-package-manifest.ts",
|
|
2151
|
+
"swift-package.ts",
|
|
2152
|
+
"swift-source-file.ts",
|
|
2153
|
+
"swift-toolchain.ts",
|
|
2154
|
+
"home-paths.ts",
|
|
2155
|
+
"xcode-header-search.ts",
|
|
2156
|
+
"xcode-project.ts",
|
|
2157
|
+
"xcode-target-members.ts",
|
|
2158
|
+
"xcode-json-project.ts",
|
|
2159
|
+
"openstep-plist.ts"
|
|
2160
|
+
];
|
|
2161
|
+
function swiftCoverageSourceDigests(srcDir) {
|
|
2162
|
+
return Object.fromEntries(
|
|
2163
|
+
SWIFT_COVERAGE_DIGEST_SOURCES.map((file) => [
|
|
2164
|
+
file,
|
|
2165
|
+
createHash("sha256").update(readFileSync(join(srcDir, file))).digest("hex")
|
|
2166
|
+
])
|
|
2167
|
+
);
|
|
2168
|
+
}
|
|
2169
|
+
var swiftCoverageProvenance = typeof define_SWIFT_COVERAGE_SOURCE_DIGESTS_default === "object" ? define_SWIFT_COVERAGE_SOURCE_DIGESTS_default : swiftCoverageSourceDigests(join(import.meta.dirname, ".."));
|
|
2170
|
+
|
|
2171
|
+
// src/swift-coverage/xcode-asset-symbols.ts
|
|
2172
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2173
|
+
import { existsSync, readdirSync, readFileSync as readFileSync2 } from "node:fs";
|
|
2174
|
+
import { extname, join as join2 } from "node:path";
|
|
2175
|
+
var silentTypes = /* @__PURE__ */ new Set([
|
|
2176
|
+
"appiconset",
|
|
2177
|
+
"brandassets",
|
|
2178
|
+
"dataset",
|
|
2179
|
+
"iconset",
|
|
2180
|
+
"iconstack",
|
|
2181
|
+
"iconstackgroup",
|
|
2182
|
+
"launchimage",
|
|
2183
|
+
"stickerpack",
|
|
2184
|
+
"stickersiconset",
|
|
2185
|
+
"textureset"
|
|
2186
|
+
]);
|
|
2187
|
+
var stackTypes = /* @__PURE__ */ new Set(["imagestack", "solidimagestack"]);
|
|
2188
|
+
var unprovenTypes = /* @__PURE__ */ new Set([
|
|
2189
|
+
"arobject",
|
|
2190
|
+
"arreferenceimage",
|
|
2191
|
+
"arresourcegroup",
|
|
2192
|
+
"complicationset",
|
|
2193
|
+
"cubetextureset",
|
|
2194
|
+
"gcdashboardimage",
|
|
2195
|
+
"gcleaderboard",
|
|
2196
|
+
"gcleaderboardset",
|
|
2197
|
+
"glyphset",
|
|
2198
|
+
"iconbadgeset",
|
|
2199
|
+
"iconstacklayer",
|
|
2200
|
+
"imagestacklayer",
|
|
2201
|
+
"mipmapset",
|
|
2202
|
+
"modelset",
|
|
2203
|
+
"sidebariconset",
|
|
2204
|
+
"solidimagestacklayer",
|
|
2205
|
+
"sticker",
|
|
2206
|
+
"stickerframeset",
|
|
2207
|
+
"stickersequence"
|
|
2208
|
+
]);
|
|
2209
|
+
var knownTypes = /* @__PURE__ */ new Set([
|
|
2210
|
+
"colorset",
|
|
2211
|
+
"imageset",
|
|
2212
|
+
"symbolset",
|
|
2213
|
+
"spriteatlas",
|
|
2214
|
+
...silentTypes,
|
|
2215
|
+
...stackTypes,
|
|
2216
|
+
...unprovenTypes
|
|
2217
|
+
]);
|
|
2218
|
+
var compressionTypes = [
|
|
2219
|
+
"automatic",
|
|
2220
|
+
"lossless",
|
|
2221
|
+
"lossy",
|
|
2222
|
+
"gpu-optimized-best",
|
|
2223
|
+
"gpu-optimized-smallest"
|
|
2224
|
+
];
|
|
2225
|
+
var renditionRules = {
|
|
2226
|
+
appearances: "objects",
|
|
2227
|
+
locale: "string",
|
|
2228
|
+
platform: "string",
|
|
2229
|
+
resizing: "object",
|
|
2230
|
+
"alignment-insets": "object",
|
|
2231
|
+
"compression-type": compressionTypes,
|
|
2232
|
+
"display-gamut": ["sRGB", "display-P3"],
|
|
2233
|
+
"minimum-system-version": "string",
|
|
2234
|
+
"matching-style": "string",
|
|
2235
|
+
"template-rendering-intent": "string",
|
|
2236
|
+
size: "string",
|
|
2237
|
+
role: "string",
|
|
2238
|
+
orientation: "string",
|
|
2239
|
+
extent: "string"
|
|
2240
|
+
};
|
|
2241
|
+
var setRules = {
|
|
2242
|
+
localizable: "any",
|
|
2243
|
+
"auto-scaling": "string",
|
|
2244
|
+
"symbol-rendering-intent": "string",
|
|
2245
|
+
"provides-namespace": "any",
|
|
2246
|
+
"on-demand-resource-tags": "any",
|
|
2247
|
+
"template-rendering-intent": "string",
|
|
2248
|
+
"preserves-vector-representation": "any"
|
|
2249
|
+
};
|
|
2250
|
+
var inclusionRules = {
|
|
2251
|
+
idiom: "any",
|
|
2252
|
+
subtype: "any",
|
|
2253
|
+
unassigned: "any"
|
|
2254
|
+
};
|
|
2255
|
+
var rules = {
|
|
2256
|
+
// colors check none of the image traits
|
|
2257
|
+
colorset: {
|
|
2258
|
+
entry: {
|
|
2259
|
+
...renditionRules,
|
|
2260
|
+
...inclusionRules,
|
|
2261
|
+
color: "any",
|
|
2262
|
+
scale: "string",
|
|
2263
|
+
"language-direction": "string",
|
|
2264
|
+
"width-class": "string",
|
|
2265
|
+
"height-class": "string",
|
|
2266
|
+
memory: "string",
|
|
2267
|
+
"graphics-feature-set": "string",
|
|
2268
|
+
"screen-width": "string"
|
|
2269
|
+
},
|
|
2270
|
+
set: setRules
|
|
2271
|
+
},
|
|
2272
|
+
imageset: {
|
|
2273
|
+
entry: {
|
|
2274
|
+
...renditionRules,
|
|
2275
|
+
...inclusionRules,
|
|
2276
|
+
filename: "any",
|
|
2277
|
+
scale: ["1x", "2x", "3x"],
|
|
2278
|
+
"language-direction": ["left-to-right", "right-to-left"],
|
|
2279
|
+
"width-class": ["compact", "regular", "unspecified"],
|
|
2280
|
+
"height-class": ["compact", "regular"],
|
|
2281
|
+
memory: ["1GB", "2GB", "3GB", "4GB", "6GB", "8GB", "12GB", "16GB"],
|
|
2282
|
+
"graphics-feature-set": [
|
|
2283
|
+
...Array.from({ length: 10 }, (_, i) => `apple${i + 1}`),
|
|
2284
|
+
"metal1v2",
|
|
2285
|
+
"metal2v2",
|
|
2286
|
+
"metal3v1",
|
|
2287
|
+
"metal3v2",
|
|
2288
|
+
"metal4v1"
|
|
2289
|
+
],
|
|
2290
|
+
"screen-width": "string"
|
|
2291
|
+
},
|
|
2292
|
+
// an image whose vector flag is not a boolean is dropped
|
|
2293
|
+
set: {
|
|
2294
|
+
...setRules,
|
|
2295
|
+
"preserves-vector-representation": "boolean",
|
|
2296
|
+
"compression-type": compressionTypes
|
|
2297
|
+
}
|
|
2298
|
+
},
|
|
2299
|
+
symbolset: {
|
|
2300
|
+
entry: { idiom: "any", filename: "any" },
|
|
2301
|
+
set: { "symbol-rendering-intent": "any" }
|
|
2302
|
+
}
|
|
2303
|
+
};
|
|
2304
|
+
var swiftKeywords = new Set(
|
|
2305
|
+
"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(
|
|
2306
|
+
" "
|
|
2307
|
+
)
|
|
2308
|
+
);
|
|
2309
|
+
var nsColorConflicts = new Set(
|
|
2310
|
+
"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(
|
|
2311
|
+
" "
|
|
2312
|
+
)
|
|
2313
|
+
);
|
|
2314
|
+
var uiColorConflicts = new Set(
|
|
2315
|
+
"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(
|
|
2316
|
+
" "
|
|
2317
|
+
)
|
|
2318
|
+
);
|
|
2319
|
+
var colorConflicts = new Set(
|
|
2320
|
+
"transferRepresentation accentColor secondary primary orange purple indigo yellow white black green brown clear blue pink teal cyan mint gray red".split(
|
|
2321
|
+
" "
|
|
2322
|
+
)
|
|
2323
|
+
);
|
|
2324
|
+
var nsImageConflicts = new Set(
|
|
2325
|
+
"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(
|
|
2326
|
+
" "
|
|
2327
|
+
)
|
|
2328
|
+
);
|
|
2329
|
+
|
|
2330
|
+
// src/swift-coverage/xcode-assets.ts
|
|
2331
|
+
var unprovenAssetSettings = [
|
|
2134
2332
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_FRAMEWORKS",
|
|
2135
2333
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_WARNINGS",
|
|
2136
2334
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_ERRORS",
|
|
@@ -2139,10 +2337,16 @@ var assetSymbolSettingKeys = [
|
|
|
2139
2337
|
"ASSETCATALOG_COMPILER_GENERATE_OBJC_ASSET_SYMBOLS_PATH",
|
|
2140
2338
|
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOL_INDEX_PATH",
|
|
2141
2339
|
"ASSETCATALOG_COMPILER_BUNDLE_IDENTIFIER",
|
|
2142
|
-
"ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
|
|
2340
|
+
"ASSETCATALOG_COMPILER_LIGHTWEIGHT_ASSET_RUNTIME_MODE"
|
|
2341
|
+
];
|
|
2342
|
+
var assetSymbolSettingKeys = [
|
|
2343
|
+
"ASSETCATALOG_COMPILER_GENERATE_ASSET_SYMBOLS",
|
|
2344
|
+
"ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS",
|
|
2345
|
+
"PRODUCT_BUNDLE_IDENTIFIER",
|
|
2346
|
+
"TARGETED_DEVICE_FAMILY",
|
|
2347
|
+
...unprovenAssetSettings,
|
|
2143
2348
|
"ASSETCATALOG_OTHER_FLAGS"
|
|
2144
2349
|
];
|
|
2145
|
-
var unprovenAssetSettings = assetSymbolSettingKeys.slice(4).filter((key) => key !== "ASSETCATALOG_OTHER_FLAGS");
|
|
2146
2350
|
|
|
2147
2351
|
// src/swift-package.ts
|
|
2148
2352
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -2189,8 +2393,8 @@ function swiftPackageIdentity(url) {
|
|
|
2189
2393
|
|
|
2190
2394
|
// src/swift-package-manifest.ts
|
|
2191
2395
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2192
|
-
import { execFileSync as
|
|
2193
|
-
import { createHash as
|
|
2396
|
+
import { execFileSync as execFileSync2 } from "node:child_process";
|
|
2397
|
+
import { createHash as createHash4 } from "node:crypto";
|
|
2194
2398
|
import fs3 from "node:fs";
|
|
2195
2399
|
import os2 from "node:os";
|
|
2196
2400
|
import path3 from "node:path";
|
|
@@ -2210,8 +2414,17 @@ function rnxHomeDir() {
|
|
|
2210
2414
|
function cacheDir() {
|
|
2211
2415
|
return path.join(rnxHomeDir(), "cache");
|
|
2212
2416
|
}
|
|
2417
|
+
var BUILDERS_ROOT_ENV = "CONTRAST_BUILDERS_ROOT";
|
|
2418
|
+
function buildersRootEnv() {
|
|
2419
|
+
const root = process.env[BUILDERS_ROOT_ENV]?.trim();
|
|
2420
|
+
return root ? root : null;
|
|
2421
|
+
}
|
|
2422
|
+
function swiftCacheDir() {
|
|
2423
|
+
const root = buildersRootEnv();
|
|
2424
|
+
return root ? path.join(root, "peach-cache") : cacheDir();
|
|
2425
|
+
}
|
|
2213
2426
|
function swiftPackageCacheOptions() {
|
|
2214
|
-
const root = path.join(
|
|
2427
|
+
const root = path.join(swiftCacheDir(), "swiftpm");
|
|
2215
2428
|
return ["cache", "config", "security"].flatMap((name) => [
|
|
2216
2429
|
`--${name}-path`,
|
|
2217
2430
|
path.join(root, name)
|
|
@@ -2221,12 +2434,12 @@ var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
|
|
|
2221
2434
|
|
|
2222
2435
|
// src/swift-distribution.lock.json
|
|
2223
2436
|
var swift_distribution_lock_default = {
|
|
2224
|
-
id: "
|
|
2225
|
-
release: "swift-6.4.0-RELEASE-custom-
|
|
2437
|
+
id: "95a0e12e7c0af807",
|
|
2438
|
+
release: "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66",
|
|
2226
2439
|
wasmSdkId: "swift-6.4.0-RELEASE_wasm-peach-cbf01f4b",
|
|
2227
2440
|
wasmSdkUrl: "https://r2.sootsim.com/swift-wasm-sdk/swift-6.4.0-RELEASE_wasm-peach-cbf01f4b.artifactbundle.tar.gz",
|
|
2228
2441
|
wasmSdkChecksum: "2243db65b12743d577fecc6aa27761363ccef470202f1fef2582e58750c0da4f",
|
|
2229
|
-
source: "
|
|
2442
|
+
source: "56ee2df2c863050b8261f4f20f6a51c008682ce9",
|
|
2230
2443
|
targets: [
|
|
2231
2444
|
"ImagePlayground",
|
|
2232
2445
|
"QuickLookThumbnailing",
|
|
@@ -2266,6 +2479,7 @@ var swift_distribution_lock_default = {
|
|
|
2266
2479
|
"PeachFoundation",
|
|
2267
2480
|
"FoundationNetworking",
|
|
2268
2481
|
"DeveloperToolsSupport",
|
|
2482
|
+
"CoreImageEnums",
|
|
2269
2483
|
"SwiftUI",
|
|
2270
2484
|
"DarwinRecords",
|
|
2271
2485
|
"Darwin",
|
|
@@ -2397,11 +2611,12 @@ var swift_distribution_lock_default = {
|
|
|
2397
2611
|
],
|
|
2398
2612
|
systemEnvironment: {
|
|
2399
2613
|
scenePhase: ["string:active", "string:inactive", "string:background"],
|
|
2400
|
-
colorScheme: ["string:light", "string:dark"],
|
|
2401
|
-
semanticColors: ["object"],
|
|
2402
2614
|
deviceModel: ["string"],
|
|
2403
2615
|
systemName: ["string"],
|
|
2404
2616
|
systemVersion: ["string"],
|
|
2617
|
+
colorScheme: ["string:light", "string:dark"],
|
|
2618
|
+
semanticColors: ["object"],
|
|
2619
|
+
imageAssets: ["object"],
|
|
2405
2620
|
locale: ["string"],
|
|
2406
2621
|
dynamicTypeSize: [
|
|
2407
2622
|
"string:xSmall",
|
|
@@ -2417,35 +2632,72 @@ var swift_distribution_lock_default = {
|
|
|
2417
2632
|
"string:accessibility4",
|
|
2418
2633
|
"string:accessibility5"
|
|
2419
2634
|
],
|
|
2420
|
-
accessibilityReduceMotion: ["bool"],
|
|
2421
2635
|
horizontalSizeClass: ["string:compact", "string:regular"],
|
|
2422
2636
|
verticalSizeClass: ["string:compact", "string:regular"],
|
|
2423
|
-
|
|
2637
|
+
accessibilityReduceMotion: ["bool"]
|
|
2424
2638
|
},
|
|
2425
2639
|
hosts: {
|
|
2426
2640
|
"darwin-arm64": {
|
|
2427
|
-
sha256: "
|
|
2428
|
-
size:
|
|
2641
|
+
sha256: "2ab6cf8ee1a10b76ef46c90c8ee384f44594aa5be63ac267f55ab6cd30722595",
|
|
2642
|
+
size: 88639020
|
|
2429
2643
|
},
|
|
2430
2644
|
"linux-x64": {
|
|
2431
|
-
sha256: "
|
|
2432
|
-
size:
|
|
2645
|
+
sha256: "e159994e38c6043515c97d818c63f1e1b0170fb73b2cb721a6913b21691b1ec7",
|
|
2646
|
+
size: 91386228
|
|
2433
2647
|
},
|
|
2434
2648
|
"linux-arm64": {
|
|
2435
|
-
sha256: "
|
|
2436
|
-
size:
|
|
2649
|
+
sha256: "80ef20a79414516631bc1394c1fcd045d0381a3c8be8b65967d6a089ad768d23",
|
|
2650
|
+
size: 90878300
|
|
2437
2651
|
}
|
|
2438
2652
|
}
|
|
2439
2653
|
};
|
|
2440
2654
|
|
|
2441
2655
|
// src/swift-toolchain.ts
|
|
2442
2656
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2443
|
-
import { execFileSync
|
|
2444
|
-
import { createHash as
|
|
2657
|
+
import { execFileSync } from "node:child_process";
|
|
2658
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
2445
2659
|
import fs2 from "node:fs";
|
|
2446
2660
|
import os from "node:os";
|
|
2447
2661
|
import path2 from "node:path";
|
|
2448
2662
|
import { fileURLToPath } from "node:url";
|
|
2663
|
+
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66";
|
|
2664
|
+
var SWIFT_HOST_COMPILER_ID = "0b2d0a9011c88e66";
|
|
2665
|
+
var compilerArchives = {
|
|
2666
|
+
"swift-6.4.0-RELEASE-custom-ecd2ad9d3fe59329": {
|
|
2667
|
+
identity: "ecd2ad9d3fe59329",
|
|
2668
|
+
hosts: {
|
|
2669
|
+
"darwin-arm64": {
|
|
2670
|
+
checksum: "ab42a13b34e410ca09737420d1ee1d6af417eec039ab44f9a60502bdb5c76506",
|
|
2671
|
+
manifest: "8a93b6b1e6ff577f6dacd81a511d415ca3b396698f9b0c4abc35a4ca807e9d1a"
|
|
2672
|
+
},
|
|
2673
|
+
"linux-x64": {
|
|
2674
|
+
checksum: "b174baa2c578fb32f09c79590d65d03951b04cdec52101b23a46c0b274249fc3",
|
|
2675
|
+
manifest: "330e6cbae5890111c22a58e645049a971eff30334c3f240c650fcfedfeab4ef6"
|
|
2676
|
+
},
|
|
2677
|
+
"linux-arm64": {
|
|
2678
|
+
checksum: "25f722334dd9d79391cb2e47301165e9ef98dd9a8036927652f3c5db3c56b2ae",
|
|
2679
|
+
manifest: "94e5667febf26f8a4ee8c5456f83f62d17453e503d261a4c46d2b80f872470ab"
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
},
|
|
2683
|
+
[SWIFT_HOST_COMPILER_RELEASE]: {
|
|
2684
|
+
identity: SWIFT_HOST_COMPILER_ID,
|
|
2685
|
+
hosts: {
|
|
2686
|
+
"darwin-arm64": {
|
|
2687
|
+
checksum: "dc6a494227297ea657e8e5f7c5b4a861cb5e142bdbcfcb028ace2aeb19db90cc",
|
|
2688
|
+
manifest: "d8e9eee0fb9b847f1e9350525d6c68606df46101745f553332309ed026b3c26a"
|
|
2689
|
+
},
|
|
2690
|
+
"linux-x64": {
|
|
2691
|
+
checksum: "85c04b4496aea1657c21a47f448e01d6ccc1c7920d130a566db37fb8350a7be2",
|
|
2692
|
+
manifest: "8451659e74235ad53b700c1afbe293512197900eb98cb1f79e36df2f5c85d511"
|
|
2693
|
+
},
|
|
2694
|
+
"linux-arm64": {
|
|
2695
|
+
checksum: "196606ed62c5c926d18e6ef0769cb1ab21c9943f9084070ddf14a7bc696768b8",
|
|
2696
|
+
manifest: "85fb8d5b6527bd75003a6dbd25b68b22540665cf9df9b13f41f82e5d8acdbf1d"
|
|
2697
|
+
}
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
};
|
|
2449
2701
|
function swiftToolchainBin(release) {
|
|
2450
2702
|
if (process.platform === "darwin") {
|
|
2451
2703
|
const dirs = [os.homedir(), "/"].map(
|
|
@@ -2483,6 +2735,11 @@ function swiftEnvironment(base = process.env) {
|
|
|
2483
2735
|
function swiftCommand() {
|
|
2484
2736
|
return path3.join(swiftToolchainBin(swift_distribution_lock_default.release), "swift");
|
|
2485
2737
|
}
|
|
2738
|
+
function swiftPackageFailure(error) {
|
|
2739
|
+
if (!(error instanceof Error)) return String(error);
|
|
2740
|
+
const stderr = "stderr" in error && (typeof error.stderr === "string" || Buffer.isBuffer(error.stderr)) ? error.stderr.toString().trim() : "";
|
|
2741
|
+
return stderr || error.message;
|
|
2742
|
+
}
|
|
2486
2743
|
var cacheDir2 = path3.join(cacheDir(), "swift-manifests");
|
|
2487
2744
|
var requirementClause = (item) => {
|
|
2488
2745
|
const url = JSON.stringify(item.url);
|
|
@@ -2527,7 +2784,7 @@ let package = Package(
|
|
|
2527
2784
|
try {
|
|
2528
2785
|
fs3.writeFileSync(path3.join(dir, "Package.swift"), manifest);
|
|
2529
2786
|
try {
|
|
2530
|
-
|
|
2787
|
+
execFileSync2(
|
|
2531
2788
|
swiftCommand(),
|
|
2532
2789
|
[
|
|
2533
2790
|
"package",
|
|
@@ -2546,9 +2803,9 @@ let package = Package(
|
|
|
2546
2803
|
}
|
|
2547
2804
|
);
|
|
2548
2805
|
} catch (error) {
|
|
2549
|
-
const stderr = error instanceof Error && "stderr" in error ? String(error.stderr).trim() : "";
|
|
2550
2806
|
throw new Error(
|
|
2551
|
-
`swiftpm could not resolve ${clauses.length} package requirements${
|
|
2807
|
+
`swiftpm could not resolve ${clauses.length} package requirements (${clauses.join(", ")}): ${swiftPackageFailure(error)}`,
|
|
2808
|
+
{ cause: error }
|
|
2552
2809
|
);
|
|
2553
2810
|
}
|
|
2554
2811
|
const resolved = path3.join(dir, "Package.resolved");
|
|
@@ -2949,7 +3206,23 @@ function isJsonObject(value) {
|
|
|
2949
3206
|
|
|
2950
3207
|
// src/xcode-project.ts
|
|
2951
3208
|
var XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET = "27.0";
|
|
3209
|
+
var CXX_STANDARD_ALIASES = {
|
|
3210
|
+
"c++0x": "c++11",
|
|
3211
|
+
"gnu++0x": "gnu++11"
|
|
3212
|
+
};
|
|
3213
|
+
var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
|
|
3214
|
+
"c++98",
|
|
3215
|
+
"gnu++98",
|
|
3216
|
+
"c++0x",
|
|
3217
|
+
"gnu++0x",
|
|
3218
|
+
"c++14",
|
|
3219
|
+
"gnu++14",
|
|
3220
|
+
"c++17",
|
|
3221
|
+
"gnu++17",
|
|
3222
|
+
"compiler-default"
|
|
3223
|
+
]);
|
|
2952
3224
|
var APPLICATION = "com.apple.product-type.application";
|
|
3225
|
+
var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
|
|
2953
3226
|
var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
|
|
2954
3227
|
"com.apple.product-type.framework",
|
|
2955
3228
|
"com.apple.product-type.framework.static"
|
|
@@ -3114,7 +3387,7 @@ function loadProject(xcodeproj) {
|
|
|
3114
3387
|
if (!projectFile)
|
|
3115
3388
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
3116
3389
|
const source = fs4.readFileSync(projectFile, "utf8");
|
|
3117
|
-
const digest =
|
|
3390
|
+
const digest = createHash5("sha256").update(source).digest("hex");
|
|
3118
3391
|
const cached = loaded.get(projectFile);
|
|
3119
3392
|
if (cached?.digest === digest) return cached.project;
|
|
3120
3393
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -3224,7 +3497,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3224
3497
|
const derived = (key) => {
|
|
3225
3498
|
if (key === "AppIdentifierPrefix" || key === "TeamIdentifierPrefix")
|
|
3226
3499
|
return teamPrefix();
|
|
3227
|
-
return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : process.env[key] ?? "";
|
|
3500
|
+
return Object.hasOwn(derivedSettings, key) ? derivedSettings[key]() : options.environment?.[key] ?? process.env[key] ?? "";
|
|
3228
3501
|
};
|
|
3229
3502
|
return {
|
|
3230
3503
|
get,
|
|
@@ -3246,7 +3519,7 @@ function settingList(value) {
|
|
|
3246
3519
|
);
|
|
3247
3520
|
return items2;
|
|
3248
3521
|
}
|
|
3249
|
-
function expandSearchPath(directory,
|
|
3522
|
+
function expandSearchPath(directory, rules2) {
|
|
3250
3523
|
if (path5.basename(directory) !== "**") return [directory];
|
|
3251
3524
|
const expanded = [];
|
|
3252
3525
|
const seen = /* @__PURE__ */ new Set();
|
|
@@ -3263,8 +3536,8 @@ function expandSearchPath(directory, rules) {
|
|
|
3263
3536
|
seen.add(real);
|
|
3264
3537
|
expanded.push(current);
|
|
3265
3538
|
for (const entry of fs4.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
3266
|
-
if (entry.isSymbolicLink() ? !
|
|
3267
|
-
if (
|
|
3539
|
+
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
3540
|
+
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
3268
3541
|
continue;
|
|
3269
3542
|
queue.push(path5.join(current, entry.name));
|
|
3270
3543
|
}
|
|
@@ -3438,7 +3711,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3438
3711
|
);
|
|
3439
3712
|
});
|
|
3440
3713
|
}
|
|
3441
|
-
const signature =
|
|
3714
|
+
const signature = createHash5("sha256").update(
|
|
3442
3715
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
3443
3716
|
);
|
|
3444
3717
|
for (const file of inputFiles) {
|
|
@@ -3466,7 +3739,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
3466
3739
|
);
|
|
3467
3740
|
});
|
|
3468
3741
|
try {
|
|
3469
|
-
|
|
3742
|
+
execFileSync3(
|
|
3470
3743
|
str(phase.shellPath) ?? "/bin/sh",
|
|
3471
3744
|
["-c", str(phase.shellScript) ?? ""],
|
|
3472
3745
|
{
|
|
@@ -3702,7 +3975,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3702
3975
|
}
|
|
3703
3976
|
}
|
|
3704
3977
|
return found.filter(
|
|
3705
|
-
(candidate) => candidate.target.isa === "PBXAggregateTarget" || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
3978
|
+
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
3706
3979
|
);
|
|
3707
3980
|
};
|
|
3708
3981
|
const order = [];
|
|
@@ -3824,6 +4097,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3824
4097
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
3825
4098
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
3826
4099
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
4100
|
+
UNLOCALIZED_RESOURCES_FOLDER_PATH: str(ref.project.object(str(ref.target.productReference))?.path) ?? "",
|
|
3827
4101
|
PROJECT_TEMP_DIR: "$(OBJROOT)/$(PROJECT_NAME).build",
|
|
3828
4102
|
CONFIGURATION_TEMP_DIR: "$(PROJECT_TEMP_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
3829
4103
|
TARGET_TEMP_DIR: "$(CONFIGURATION_TEMP_DIR)/$(TARGET_NAME).build",
|
|
@@ -3831,6 +4105,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3831
4105
|
TEMP_FILES_DIR: "$(TEMP_DIR)",
|
|
3832
4106
|
TEMP_FILE_DIR: "$(TEMP_DIR)",
|
|
3833
4107
|
TEMP_ROOT: "$(OBJROOT)",
|
|
4108
|
+
OBJECT_FILE_DIR: "$(TARGET_TEMP_DIR)/Objects",
|
|
4109
|
+
// the per-variant object directory carries no arch: xcode defines
|
|
4110
|
+
// OBJECT_FILE_DIR_normal as OBJECT_FILE_DIR-normal, and the target
|
|
4111
|
+
// appends $(CURRENT_ARCH) itself for the per-arch directory.
|
|
4112
|
+
OBJECT_FILE_DIR_normal: "$(OBJECT_FILE_DIR)-normal",
|
|
3834
4113
|
DERIVED_FILE_DIR: "$(TARGET_TEMP_DIR)/DerivedSources",
|
|
3835
4114
|
DERIVED_FILES_DIR: "$(DERIVED_FILE_DIR)",
|
|
3836
4115
|
DERIVED_SOURCES_DIR: "$(DERIVED_FILE_DIR)",
|
|
@@ -3958,6 +4237,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3958
4237
|
}
|
|
3959
4238
|
const wrapper = path5.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
3960
4239
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
4240
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path5.join(path5.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
4241
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap && fs4.existsSync(moduleMap) && fs4.existsSync(frameworkUmbrella) ? {
|
|
4242
|
+
framework: true,
|
|
4243
|
+
moduleMap,
|
|
4244
|
+
umbrella: frameworkUmbrella,
|
|
4245
|
+
outputModuleMap: path5.join(wrapper, "Modules", "module.modulemap"),
|
|
4246
|
+
outputUmbrella: path5.join(
|
|
4247
|
+
wrapper,
|
|
4248
|
+
"Headers",
|
|
4249
|
+
path5.basename(frameworkUmbrella)
|
|
4250
|
+
),
|
|
4251
|
+
outputHeader: path5.join(
|
|
4252
|
+
wrapper,
|
|
4253
|
+
"Headers",
|
|
4254
|
+
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
4255
|
+
)
|
|
4256
|
+
} : null;
|
|
4257
|
+
const swiftCompatibility = compatibility ? {
|
|
4258
|
+
framework: false,
|
|
4259
|
+
moduleMap: compatibility.moduleMap,
|
|
4260
|
+
umbrella: compatibility.umbrella,
|
|
4261
|
+
outputModuleMap: compatibility.outputModuleMap,
|
|
4262
|
+
outputUmbrella: compatibility.outputUmbrella,
|
|
4263
|
+
outputHeader: compatibility.outputHeader
|
|
4264
|
+
} : frameworkCompatibility;
|
|
3961
4265
|
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path5.relative(path5.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path5.sep)[0] !== ".." && fs4.existsSync(moduleMap) ? fs4.readdirSync(path5.dirname(moduleMap)).flatMap((entry) => {
|
|
3962
4266
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
3963
4267
|
const file = path5.join(path5.dirname(moduleMap), entry);
|
|
@@ -3979,6 +4283,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
3979
4283
|
);
|
|
3980
4284
|
}
|
|
3981
4285
|
}
|
|
4286
|
+
const cStandard = settings2("GCC_C_LANGUAGE_STANDARD");
|
|
4287
|
+
const cxxStandard = settings2("CLANG_CXX_LANGUAGE_STANDARD");
|
|
3982
4288
|
return {
|
|
3983
4289
|
settings: settings2,
|
|
3984
4290
|
keys,
|
|
@@ -4004,13 +4310,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4004
4310
|
swift: {
|
|
4005
4311
|
flags: settingList(settings2("OTHER_SWIFT_FLAGS")),
|
|
4006
4312
|
includePaths: settingList(settings2("SWIFT_INCLUDE_PATHS")).map(absolute),
|
|
4007
|
-
compatibility:
|
|
4008
|
-
moduleMap: compatibility.moduleMap,
|
|
4009
|
-
umbrella: compatibility.umbrella,
|
|
4010
|
-
outputModuleMap: compatibility.outputModuleMap,
|
|
4011
|
-
outputUmbrella: compatibility.outputUmbrella,
|
|
4012
|
-
outputHeader: compatibility.outputHeader
|
|
4013
|
-
} : null
|
|
4313
|
+
compatibility: swiftCompatibility
|
|
4014
4314
|
}
|
|
4015
4315
|
} : {},
|
|
4016
4316
|
...native ? {
|
|
@@ -4060,14 +4360,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4060
4360
|
settings2("CLANG_ENABLE_OBJC_ARC") === "YES" ? "-fobjc-arc" : "-fno-objc-arc",
|
|
4061
4361
|
...settings2("CLANG_ENABLE_OBJC_WEAK") === "YES" ? ["-fobjc-weak"] : [],
|
|
4062
4362
|
...settings2("CLANG_ENABLE_MODULES") === "YES" ? ["-fmodules"] : [],
|
|
4063
|
-
...
|
|
4363
|
+
...cStandard && cStandard !== "compiler-default" ? [`-std=${cStandard}`] : [],
|
|
4064
4364
|
...settingList(settings2("GCC_PREPROCESSOR_DEFINITIONS")).map(
|
|
4065
4365
|
(value) => `-D${value}`
|
|
4066
4366
|
),
|
|
4067
4367
|
...settingList(settings2("OTHER_CFLAGS"))
|
|
4068
4368
|
],
|
|
4069
4369
|
cxxFlags: [
|
|
4070
|
-
...
|
|
4370
|
+
...cxxStandard && cxxStandard !== "compiler-default" ? [`-std=${CXX_STANDARD_ALIASES[cxxStandard] ?? cxxStandard}`] : [],
|
|
4371
|
+
// clang.xcspec's hidden CLANG_DISABLE_CXX_MODULES (default
|
|
4372
|
+
// YES) keeps c++ and objective-c++ units out of modules when
|
|
4373
|
+
// modules are on or the standard is c++20 or later.
|
|
4374
|
+
...settings2("CLANG_DISABLE_CXX_MODULES") !== "NO" && (settings2("CLANG_ENABLE_MODULES") === "YES" || !PRE_CXX20_STANDARDS.has(cxxStandard || "compiler-default")) ? ["-fno-cxx-modules"] : [],
|
|
4071
4375
|
...settingList(settings2("OTHER_CPLUSPLUSFLAGS"))
|
|
4072
4376
|
],
|
|
4073
4377
|
fileFlags,
|
|
@@ -4092,6 +4396,32 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4092
4396
|
]
|
|
4093
4397
|
]
|
|
4094
4398
|
),
|
|
4399
|
+
// a copy files phase into the products directory, as
|
|
4400
|
+
// cocoapods writes for each header_mappings_dir folder.
|
|
4401
|
+
...list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
4402
|
+
const phase = ref.project.object(phaseId);
|
|
4403
|
+
if (phase?.isa !== "PBXCopyFilesBuildPhase" || str(phase.dstSubfolderSpec) !== "16")
|
|
4404
|
+
return [];
|
|
4405
|
+
const destination = expand(
|
|
4406
|
+
str(phase.dstPath) ?? "",
|
|
4407
|
+
(name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? path5.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? path5.join(wrapper, "PrivateHeaders") : settings2(name2)
|
|
4408
|
+
);
|
|
4409
|
+
return list(phase.files).flatMap((id) => {
|
|
4410
|
+
const file = ref.project.resolvePath(
|
|
4411
|
+
str(ref.project.object(id)?.fileRef) ?? ""
|
|
4412
|
+
);
|
|
4413
|
+
return file && HEADER_FILE.test(file) ? [
|
|
4414
|
+
[
|
|
4415
|
+
path5.resolve(
|
|
4416
|
+
settings2("BUILT_PRODUCTS_DIR"),
|
|
4417
|
+
destination,
|
|
4418
|
+
path5.basename(file)
|
|
4419
|
+
),
|
|
4420
|
+
file
|
|
4421
|
+
]
|
|
4422
|
+
] : [];
|
|
4423
|
+
});
|
|
4424
|
+
}),
|
|
4095
4425
|
...moduleMap ? [[path5.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
4096
4426
|
]) : Object.fromEntries(podHeaders.map((file) => [file, file]))
|
|
4097
4427
|
}
|
|
@@ -4101,21 +4431,85 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4101
4431
|
};
|
|
4102
4432
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
4103
4433
|
const { settings, keys: settingKeys, module } = builtTargets.at(-1);
|
|
4104
|
-
const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => ref.target.
|
|
4434
|
+
const frameworkTargets = builtTargets.slice(0, -1).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module2 }) => ({ ref, framework: module2 }));
|
|
4105
4435
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
4106
4436
|
const podSourceDirs = frameworkTargets.flatMap(
|
|
4107
4437
|
({ ref, framework }) => isPodsProject(ref.project.xcodeproj) ? [...framework.allSources, ...framework.objc?.headers ?? []].map((file) => path5.dirname(file)).filter((dir) => fs4.existsSync(dir)) : []
|
|
4108
4438
|
);
|
|
4109
|
-
const expandValue = (value) => {
|
|
4110
|
-
if (typeof value === "string") return expand(value,
|
|
4111
|
-
if (Array.isArray(value)) return value.map(expandValue);
|
|
4439
|
+
const expandValue = (value, settings2) => {
|
|
4440
|
+
if (typeof value === "string") return expand(value, settings2);
|
|
4441
|
+
if (Array.isArray(value)) return value.map((item) => expandValue(item, settings2));
|
|
4112
4442
|
if (typeof value === "object" && !(value instanceof Date) && !Buffer.isBuffer(value)) {
|
|
4113
4443
|
return Object.fromEntries(
|
|
4114
|
-
Object.entries(value).map(([key, value2]) => [key, expandValue(value2)])
|
|
4444
|
+
Object.entries(value).map(([key, value2]) => [key, expandValue(value2, settings2)])
|
|
4115
4445
|
);
|
|
4116
4446
|
}
|
|
4117
4447
|
return value;
|
|
4118
4448
|
};
|
|
4449
|
+
const resourceProducts = [];
|
|
4450
|
+
const bundleTargets = builtTargets.filter(
|
|
4451
|
+
({ ref }) => ref.target.productType === RESOURCE_BUNDLE
|
|
4452
|
+
);
|
|
4453
|
+
for (const owner of options.installedPods ? builtTargets : []) {
|
|
4454
|
+
for (const phaseId of list(owner.ref.target.buildPhases)) {
|
|
4455
|
+
const phase = owner.ref.project.object(phaseId);
|
|
4456
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
4457
|
+
continue;
|
|
4458
|
+
const absolute = (raw) => path5.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
4459
|
+
const entries = (paths) => paths.flatMap((raw) => {
|
|
4460
|
+
const file = absolute(raw);
|
|
4461
|
+
xcconfigs.add(file);
|
|
4462
|
+
return fileListEntries(file, absolute);
|
|
4463
|
+
});
|
|
4464
|
+
const inputs = entries(list(phase.inputFileListPaths)).filter(
|
|
4465
|
+
(file) => file.endsWith(".bundle")
|
|
4466
|
+
);
|
|
4467
|
+
const outputs = entries(list(phase.outputFileListPaths)).filter(
|
|
4468
|
+
(file) => file.endsWith(".bundle")
|
|
4469
|
+
);
|
|
4470
|
+
if (inputs.length !== outputs.length)
|
|
4471
|
+
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
4472
|
+
const destinationRoot = path5.join(
|
|
4473
|
+
owner.settings("TARGET_BUILD_DIR"),
|
|
4474
|
+
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
4475
|
+
);
|
|
4476
|
+
for (const [index, input2] of inputs.entries()) {
|
|
4477
|
+
const product = bundleTargets.find((target) => {
|
|
4478
|
+
const file = str(
|
|
4479
|
+
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
4480
|
+
);
|
|
4481
|
+
return file && path5.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
4482
|
+
});
|
|
4483
|
+
if (!product)
|
|
4484
|
+
throw new Error(
|
|
4485
|
+
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
4486
|
+
);
|
|
4487
|
+
const destination = path5.relative(destinationRoot, outputs[index]);
|
|
4488
|
+
if (destination === ".." || destination.startsWith(`..${path5.sep}`) || path5.isAbsolute(destination) || path5.basename(input2) !== path5.basename(destination))
|
|
4489
|
+
throw new Error(
|
|
4490
|
+
`${owner.module.name}: invalid resource bundle copy destination`
|
|
4491
|
+
);
|
|
4492
|
+
const infoFile = path5.resolve(
|
|
4493
|
+
product.ref.project.projectDir,
|
|
4494
|
+
product.settings("INFOPLIST_FILE")
|
|
4495
|
+
);
|
|
4496
|
+
xcconfigs.add(infoFile);
|
|
4497
|
+
const parsed = plist2.parse(fs4.readFileSync(infoFile, "utf8"));
|
|
4498
|
+
const infoPlist = plist2.build(expandValue(parsed, product.settings));
|
|
4499
|
+
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
4500
|
+
const bundlePath = prefix + destination.split(path5.sep).join("/");
|
|
4501
|
+
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
4502
|
+
throw new Error(
|
|
4503
|
+
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
4504
|
+
);
|
|
4505
|
+
resourceProducts.push({
|
|
4506
|
+
path: bundlePath,
|
|
4507
|
+
resources: product.module.resources,
|
|
4508
|
+
infoPlist
|
|
4509
|
+
});
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4119
4513
|
const infoPlistFile = settings("INFOPLIST_FILE") ? path5.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
4120
4514
|
const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
4121
4515
|
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(fs4.readFileSync(infoPlistFile, "utf8")) : {};
|
|
@@ -4123,7 +4517,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4123
4517
|
throw new Error(`${module.name} Info.plist must contain a dictionary`);
|
|
4124
4518
|
}
|
|
4125
4519
|
const info = {};
|
|
4126
|
-
for (const [key, value] of Object.entries(sourceInfo))
|
|
4520
|
+
for (const [key, value] of Object.entries(sourceInfo))
|
|
4521
|
+
info[key] = expandValue(value, settings);
|
|
4127
4522
|
for (const key of settingKeys) {
|
|
4128
4523
|
if (!key.startsWith("INFOPLIST_KEY_") || key.endsWith("_Generation")) continue;
|
|
4129
4524
|
const value = settings(key);
|
|
@@ -4265,11 +4660,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4265
4660
|
const fileId = str(project.object(buildFileId)?.fileRef);
|
|
4266
4661
|
const file = project.object(fileId);
|
|
4267
4662
|
const tree = str(file?.sourceTree);
|
|
4268
|
-
const
|
|
4663
|
+
const rawPath = str(file?.path) ?? "";
|
|
4664
|
+
const name = /([^/]+)\.(xc)?framework$/.exec(rawPath)?.[1];
|
|
4269
4665
|
if (file?.isa !== "PBXFileReference" || !name) continue;
|
|
4270
|
-
if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR"
|
|
4666
|
+
if (tree === "BUILT_PRODUCTS_DIR" || tree === "SDKROOT" || tree === "DEVELOPER_DIR" || // a path into the sdk's own frameworks folder is the sdk's own
|
|
4667
|
+
// however it is rooted: xcode links -framework <name> from the sdk
|
|
4668
|
+
// and a stale group-relative path to it contributes nothing.
|
|
4669
|
+
/\/System\/Library\/Frameworks\/[^/]+$/.test(`/${rawPath}`) || // a target in the workspace builds it, so it exists only after that build
|
|
4670
|
+
byProduct.has(path5.basename(rawPath)))
|
|
4271
4671
|
continue;
|
|
4272
4672
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
4673
|
+
if (fileId && resolved !== null && !fs4.existsSync(resolved))
|
|
4674
|
+
throw new Error(
|
|
4675
|
+
`${str(target.name) ?? "target"}: linked framework ${name} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
4676
|
+
);
|
|
4273
4677
|
if (!binaryFrameworks.get(name)) binaryFrameworks.set(name, resolved);
|
|
4274
4678
|
}
|
|
4275
4679
|
}
|
|
@@ -4323,7 +4727,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4323
4727
|
appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
|
|
4324
4728
|
infoPlist: infoPlistPending ? null : plist2.build(info),
|
|
4325
4729
|
infoPlistFile,
|
|
4730
|
+
developmentRegion: str(app.project.project.developmentRegion) ?? "en",
|
|
4326
4731
|
frameworks,
|
|
4732
|
+
resourceProducts,
|
|
4327
4733
|
linkedProducts,
|
|
4328
4734
|
localPackageDirs: [
|
|
4329
4735
|
...new Set(localPackageDirs.map((dir) => fs4.realpathSync(dir)))
|
|
@@ -4459,10 +4865,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
4459
4865
|
}
|
|
4460
4866
|
var NativeAppTargetSelectionError = class extends Error {
|
|
4461
4867
|
};
|
|
4462
|
-
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest) {
|
|
4868
|
+
function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment) {
|
|
4463
4869
|
const read = selectNativeAppIdentityReader(platform, {
|
|
4464
4870
|
android: () => readAndroidNativeAppIdentity(projectRoot, androidMergedManifest),
|
|
4465
|
-
ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget)
|
|
4871
|
+
ios: () => readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment)
|
|
4466
4872
|
});
|
|
4467
4873
|
return read ? read() : null;
|
|
4468
4874
|
}
|
|
@@ -4543,8 +4949,8 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
|
4543
4949
|
androidMergedManifest
|
|
4544
4950
|
);
|
|
4545
4951
|
}
|
|
4546
|
-
function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
4547
|
-
const app = readIosAppTarget(projectRoot, iosTarget);
|
|
4952
|
+
function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment) {
|
|
4953
|
+
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
4548
4954
|
if (!app) return null;
|
|
4549
4955
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
4550
4956
|
const projectManifestPath = path6.join(projectRoot, "package.json");
|
|
@@ -4598,7 +5004,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget) {
|
|
|
4598
5004
|
}
|
|
4599
5005
|
return { ...identity, reanimatedStaticFeatureFlags: flags };
|
|
4600
5006
|
}
|
|
4601
|
-
function readIosAppTarget(projectRoot, iosTarget) {
|
|
5007
|
+
function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
4602
5008
|
const iosRoot = path6.join(projectRoot, "ios");
|
|
4603
5009
|
if (!fs5.existsSync(iosRoot)) return null;
|
|
4604
5010
|
const projects = fs5.readdirSync(iosRoot, { withFileTypes: true }).filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj"));
|
|
@@ -4634,7 +5040,8 @@ function readIosAppTarget(projectRoot, iosTarget) {
|
|
|
4634
5040
|
}
|
|
4635
5041
|
return readXcodeAppTarget(xcodeproj, iosTarget ?? appTargets[0], "Release", {
|
|
4636
5042
|
requireSources: false,
|
|
4637
|
-
prepareGeneratedSources: true
|
|
5043
|
+
prepareGeneratedSources: true,
|
|
5044
|
+
environment
|
|
4638
5045
|
});
|
|
4639
5046
|
}
|
|
4640
5047
|
export {
|