peachsim 0.1.1881 → 0.1.1886
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/control.ts +11 -10
- package/cli/commands/reset.ts +1 -1
- package/cli/outbound-endpoints.ts +1 -1
- package/detox/index.ts +62 -1
- 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 +8914 -4264
- 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 +35 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +8494 -3955
- package/dist-lib/expo-swift-metadata.cjs +5 -1
- package/dist-lib/expo-swift-metadata.mjs +5 -1
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +9679 -5057
- package/dist-lib/host/fetch-proxy-handler.cjs +93 -13
- package/dist-lib/host/fetch-proxy-overrides.cjs +10 -2
- package/dist-lib/host/fetch-proxy-overrides.mjs +8 -2
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +525 -120
- 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 +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +1 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +523 -118
- package/dist-lib/native-app-identity-project.cjs +395 -72
- package/dist-lib/native-app-identity-project.mjs +720 -375
- package/dist-lib/native-app-identity.cjs +37 -1
- package/dist-lib/native-app-identity.mjs +36 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.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 +58 -28
- package/dist-lib/public-origins-lib.json +233 -92
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +1 -1
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +30711 -25956
- package/dist-lib/swift-compile.cjs +6782 -2533
- package/dist-lib/swift-compile.mjs +6112 -1864
- package/dist-lib/swift-package.cjs +20 -3
- package/dist-lib/swift-package.mjs +20 -3
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +19 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +8640 -4109
- package/dist-lib/vite.cjs +93 -13
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/canvaskit-api.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/engine/fontDataContract.d.ts +2 -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-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +11 -1
- package/dist-types/packages/peach-engine/src/render-worker/shell-tree-wire.d.ts +2 -1
- package/dist-types/packages/peach-globals/src/nodeContract.d.ts +1 -0
- package/dist-types/packages/peach-globals/src/testBridgeContract.d.ts +10 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/dist-types/packages/peach-kit/src/ui/popover-placement.d.ts +1 -1
- package/dist-types/packages/sootsim-swift/src/securityHostContract.d.ts +10 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFHost.h +555 -0
- package/sdk/ios/System/Library/Frameworks/CFNetwork.framework/Headers/CFNetwork.h +1 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +6 -0
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSURLProtocol.h +0 -1
- package/sdk/ios/System/Library/Frameworks/QuartzCore.framework/Modules/module.modulemap +6 -0
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarButtonItemBadge.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIBarMinimization.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UIScrollView.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UISearchTab.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITab.h +1 -1
- package/sdk/ios/System/Library/Frameworks/UIKit.framework/Headers/UITabAccessory.h +2 -2
- package/sdk/ios/usr/include/os/activity.h +534 -0
- package/sdk/ios/usr/include/os.modulemap +15 -0
- package/sdk/ios/wasm/include/fcntl.h +16 -0
- package/sdk/ios/wasm/include/string.h +5 -0
- package/sdk/native-hashes.json +1 -1
- package/src/dns-over-https.ts +61 -9
- package/src/expo-swift-host.ts +11 -3
- package/src/host/fetch-proxy-handler.ts +51 -2
- package/src/host/fetch-proxy-overrides.ts +4 -0
- package/src/host/hostname-resolver.ts +9 -5
- package/src/native-app-identity-project.ts +13 -2
- package/src/native-app-identity.ts +47 -0
- package/src/nitro-adapter.lock.json +260 -260
- package/src/nitro-superset.lock.json +4 -4
- package/src/storageSnapshotContract.ts +20 -1
- package/src/swift-compile.ts +399 -72
- package/src/swift-compiler-digest.ts +15 -0
- package/src/swift-coverage/xcode-packages.ts +3 -2
- package/src/swift-distribution.lock.json +12 -12
- package/src/swift-guest-archive.ts +153 -0
- package/src/swift-guest-compile.ts +449 -0
- package/src/swift-guest-image-ledger.ts +656 -0
- package/src/swift-guest-link-plan.ts +52 -0
- package/src/swift-guest-link.ts +1414 -0
- package/src/swift-guest-linked-spans.ts +338 -0
- package/src/swift-guest-manifest.ts +141 -0
- package/src/swift-guest-projection-storage.ts +310 -0
- package/src/swift-guest-projection.ts +252 -0
- package/src/swift-guest-runtime-plan.ts +834 -0
- package/src/swift-guest-source-inputs.ts +427 -0
- package/src/swift-guest-source-plan.ts +279 -0
- package/src/swift-host.ts +125 -17
- package/src/swift-link-roots.ts +27 -50
- package/src/swift-package-manifest.ts +34 -18
- package/src/swift-package.ts +32 -2
- package/src/swift-packages.ts +138 -17
- package/src/swift-runtime-products.ts +73 -0
- package/src/swift-shared-sdk.ts +1 -1
- package/src/swift-submit.ts +13 -3
- package/src/swift-toolchain.ts +18 -0
- package/src/swift-wasm-prune.ts +313 -14
- package/src/swiftContract.ts +83 -0
- package/src/swiftRuntimeProductContract.ts +85 -45
- package/src/turbo-runtime.lock.json +23 -23
- package/src/wasm-optimize.ts +16 -4
- package/src/xcode-project.ts +142 -14
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.1886 | (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;
|
|
@@ -32,7 +32,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
32
32
|
var define_SWIFT_COVERAGE_SOURCE_DIGESTS_default;
|
|
33
33
|
var init_define_SWIFT_COVERAGE_SOURCE_DIGESTS = __esm({
|
|
34
34
|
"<define:__SWIFT_COVERAGE_SOURCE_DIGESTS__>"() {
|
|
35
|
-
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "
|
|
35
|
+
define_SWIFT_COVERAGE_SOURCE_DIGESTS_default = { "swift-coverage/indexdump.ts": "0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412", "swift-coverage/indexing.ts": "633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272", "swift-coverage/types.ts": "5bd72edc235189d69835155cb0367a1aee14332405896366af3be606dbe8cce8", "swift-coverage/source.ts": "8b398ceb60faf4a5729842cab60f49c2e601d6fc6bbbc1faec9023ecb8141990", "swift-coverage/package.ts": "1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b", "swift-coverage/xcode.ts": "65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa", "swift-coverage/xcode-assets.ts": "99e03b74c961d2449afd58c2cbc415ba91d1d469a4f89e461c137fd6c305b27c", "swift-coverage/xcode-asset-symbols.ts": "1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671", "swift-coverage/xcode-bridging.ts": "33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11", "swift-coverage/xcode-packages.ts": "8e6020d17d24474150a5a50d042aca6261819ef75c79680a287a66f395909915", "swift-coverage/xcode-strings.ts": "f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c", "swift-coverage/reader.ts": "da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c", "swift-coverage/provenance.ts": "eb3b41ae8b58b48f6758f084800f188dfb1edb227e483abdd6b80cde66e849b9", "swift-package-manifest.ts": "4b7d4a715cdaf57468ead23f2ff9dce76d02c6a888d73d144d4baa2ae571ba3c", "swift-package.ts": "e66452b430a7dc749e0db64e21a2f3cd969ba48fa1ae31cd5de5c366c3783bf7", "swift-source-file.ts": "93fd659ed63a27b67f54a7c229a7ceb636dc9c59e68414920ba36cff1eda1f94", "swift-toolchain.ts": "6bf3eed98e77aac803f3015787d461af79f549c57a5773a83e13b46633a871c6", "home-paths.ts": "744d0e29fcc4baae6748161da45dd75e357348703331dad685c74ec813abcc83", "xcode-header-search.ts": "f8c3d557b4eca5ddad32907545353eb7ad53b2ebd0969d9ed8f7275e109a13b1", "xcode-project.ts": "0669e4cca53dc8db00059018d7f93ff9139915fc0f4fb0c82a938febb7862dfe", "xcode-target-members.ts": "75a23a5fc54cc6f5e952d545f2f0f86241ff36525ab4e568c172e83c3bfb9da4", "xcode-json-project.ts": "41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6", "openstep-plist.ts": "74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3" };
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
|
|
@@ -85,7 +85,7 @@ var require_parse = __commonJS({
|
|
|
85
85
|
var token;
|
|
86
86
|
var key;
|
|
87
87
|
var root;
|
|
88
|
-
module.exports = function
|
|
88
|
+
module.exports = function parse4(text2, reviver) {
|
|
89
89
|
source = String(text2);
|
|
90
90
|
parseState = "start";
|
|
91
91
|
stack = [];
|
|
@@ -268,15 +268,15 @@ var require_parse = __commonJS({
|
|
|
268
268
|
return newToken("punctuator", read());
|
|
269
269
|
case "n":
|
|
270
270
|
read();
|
|
271
|
-
|
|
271
|
+
literal2("ull");
|
|
272
272
|
return newToken("null", null);
|
|
273
273
|
case "t":
|
|
274
274
|
read();
|
|
275
|
-
|
|
275
|
+
literal2("rue");
|
|
276
276
|
return newToken("boolean", true);
|
|
277
277
|
case "f":
|
|
278
278
|
read();
|
|
279
|
-
|
|
279
|
+
literal2("alse");
|
|
280
280
|
return newToken("boolean", false);
|
|
281
281
|
case "-":
|
|
282
282
|
case "+":
|
|
@@ -307,11 +307,11 @@ var require_parse = __commonJS({
|
|
|
307
307
|
return;
|
|
308
308
|
case "I":
|
|
309
309
|
read();
|
|
310
|
-
|
|
310
|
+
literal2("nfinity");
|
|
311
311
|
return newToken("numeric", Infinity);
|
|
312
312
|
case "N":
|
|
313
313
|
read();
|
|
314
|
-
|
|
314
|
+
literal2("aN");
|
|
315
315
|
return newToken("numeric", NaN);
|
|
316
316
|
case '"':
|
|
317
317
|
case "'":
|
|
@@ -405,11 +405,11 @@ var require_parse = __commonJS({
|
|
|
405
405
|
return;
|
|
406
406
|
case "I":
|
|
407
407
|
read();
|
|
408
|
-
|
|
408
|
+
literal2("nfinity");
|
|
409
409
|
return newToken("numeric", sign * Infinity);
|
|
410
410
|
case "N":
|
|
411
411
|
read();
|
|
412
|
-
|
|
412
|
+
literal2("aN");
|
|
413
413
|
return newToken("numeric", NaN);
|
|
414
414
|
}
|
|
415
415
|
throw invalidChar(read());
|
|
@@ -642,7 +642,7 @@ var require_parse = __commonJS({
|
|
|
642
642
|
column
|
|
643
643
|
};
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function literal2(s) {
|
|
646
646
|
for (const c2 of s) {
|
|
647
647
|
const p = peek();
|
|
648
648
|
if (p !== c2) {
|
|
@@ -940,12 +940,12 @@ var require_stringify = __commonJS({
|
|
|
940
940
|
replacerFunc = replacer;
|
|
941
941
|
} else if (Array.isArray(replacer)) {
|
|
942
942
|
propertyList = [];
|
|
943
|
-
for (const
|
|
943
|
+
for (const v5 of replacer) {
|
|
944
944
|
let item;
|
|
945
|
-
if (typeof
|
|
946
|
-
item =
|
|
947
|
-
} else if (typeof
|
|
948
|
-
item = String(
|
|
945
|
+
if (typeof v5 === "string") {
|
|
946
|
+
item = v5;
|
|
947
|
+
} else if (typeof v5 === "number" || v5 instanceof String || v5 instanceof Number) {
|
|
948
|
+
item = String(v5);
|
|
949
949
|
}
|
|
950
950
|
if (item !== void 0 && propertyList.indexOf(item) < 0) {
|
|
951
951
|
propertyList.push(item);
|
|
@@ -1143,10 +1143,10 @@ var require_stringify = __commonJS({
|
|
|
1143
1143
|
var require_lib = __commonJS({
|
|
1144
1144
|
"../../node_modules/json5/lib/index.js"(exports, module) {
|
|
1145
1145
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1146
|
-
var
|
|
1146
|
+
var parse4 = require_parse();
|
|
1147
1147
|
var stringify = require_stringify();
|
|
1148
1148
|
var JSON52 = {
|
|
1149
|
-
parse,
|
|
1149
|
+
parse: parse4,
|
|
1150
1150
|
stringify
|
|
1151
1151
|
};
|
|
1152
1152
|
module.exports = JSON52;
|
|
@@ -1155,9 +1155,9 @@ var require_lib = __commonJS({
|
|
|
1155
1155
|
|
|
1156
1156
|
// src/native-app-identity-project.ts
|
|
1157
1157
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
1158
|
-
import
|
|
1158
|
+
import fs18 from "node:fs";
|
|
1159
1159
|
import { createRequire } from "node:module";
|
|
1160
|
-
import
|
|
1160
|
+
import path37 from "node:path";
|
|
1161
1161
|
|
|
1162
1162
|
// src/android-app-identity.ts
|
|
1163
1163
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -1348,10 +1348,10 @@ function androidMergedResourceValuesDirectory(manifestFile) {
|
|
|
1348
1348
|
manifestFile
|
|
1349
1349
|
);
|
|
1350
1350
|
if (!match) return null;
|
|
1351
|
-
const [, intermediates,
|
|
1352
|
-
if (!
|
|
1353
|
-
const taskVariant =
|
|
1354
|
-
return `${intermediates}incremental/${
|
|
1351
|
+
const [, intermediates, variant2] = match;
|
|
1352
|
+
if (!variant2) return null;
|
|
1353
|
+
const taskVariant = variant2[0].toUpperCase() + variant2.slice(1);
|
|
1354
|
+
return `${intermediates}incremental/${variant2}/merge${taskVariant}Resources/merged.dir`;
|
|
1355
1355
|
}
|
|
1356
1356
|
|
|
1357
1357
|
// src/is-record.ts
|
|
@@ -1647,6 +1647,21 @@ function xcodeTargetMemberVisitor(objects) {
|
|
|
1647
1647
|
}
|
|
1648
1648
|
|
|
1649
1649
|
// src/native-app-identity.ts
|
|
1650
|
+
function readKeychainAccessGroups(dictionary, resolve) {
|
|
1651
|
+
if (!isRecord(dictionary))
|
|
1652
|
+
throw new Error("native app entitlements are not a dictionary");
|
|
1653
|
+
const groups = dictionary["keychain-access-groups"];
|
|
1654
|
+
if (groups === void 0) return void 0;
|
|
1655
|
+
if (!Array.isArray(groups)) throw new Error("keychain-access-groups is not an array");
|
|
1656
|
+
return groups.map((group) => {
|
|
1657
|
+
if (typeof group !== "string")
|
|
1658
|
+
throw new Error("keychain access group is not a string");
|
|
1659
|
+
const value = resolve(group);
|
|
1660
|
+
if (!value || /\$[({]/.test(value))
|
|
1661
|
+
throw new Error("keychain access group has unresolved signing settings");
|
|
1662
|
+
return value;
|
|
1663
|
+
});
|
|
1664
|
+
}
|
|
1650
1665
|
function nonEmptyString(value) {
|
|
1651
1666
|
return typeof value === "string" && value.length > 0 ? value : null;
|
|
1652
1667
|
}
|
|
@@ -1757,10 +1772,10 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
|
|
|
1757
1772
|
var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
|
|
1758
1773
|
function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
|
|
1759
1774
|
const pbxprojPath = Object.keys(files).find(
|
|
1760
|
-
(
|
|
1775
|
+
(path38) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path38)
|
|
1761
1776
|
) ?? Object.keys(files).find(
|
|
1762
|
-
(
|
|
1763
|
-
) ?? Object.keys(files).find((
|
|
1777
|
+
(path38) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path38)
|
|
1778
|
+
) ?? Object.keys(files).find((path38) => /(?:^|\/)project\.pbxproj$/.test(path38));
|
|
1764
1779
|
if (!pbxprojPath) return null;
|
|
1765
1780
|
const pbxproj = files[pbxprojPath];
|
|
1766
1781
|
let objects = {};
|
|
@@ -1802,7 +1817,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1802
1817
|
} else if (applicationTargetNames.size === 1) {
|
|
1803
1818
|
targetName = [...applicationTargetNames][0];
|
|
1804
1819
|
} else if (applicationTargetNames.size > 1) {
|
|
1805
|
-
const delegateTargets = Object.keys(files).filter((
|
|
1820
|
+
const delegateTargets = Object.keys(files).filter((path38) => !path38.includes("/Pods/")).map((path38) => path38.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
|
|
1806
1821
|
(name2) => typeof name2 === "string" && applicationTargetNames.has(name2)
|
|
1807
1822
|
);
|
|
1808
1823
|
if (delegateTargets.length === 1) {
|
|
@@ -1826,8 +1841,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1826
1841
|
if (typeof configId === "string") {
|
|
1827
1842
|
const configObj = objects[configId];
|
|
1828
1843
|
if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
|
|
1829
|
-
for (const [k,
|
|
1830
|
-
if (typeof
|
|
1844
|
+
for (const [k, v5] of Object.entries(configObj.buildSettings)) {
|
|
1845
|
+
if (typeof v5 === "string") settings[k] = v5;
|
|
1831
1846
|
}
|
|
1832
1847
|
}
|
|
1833
1848
|
}
|
|
@@ -1842,8 +1857,8 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1842
1857
|
if (typeof configId === "string") {
|
|
1843
1858
|
const configObj = objects[configId];
|
|
1844
1859
|
if (isRecord(configObj) && configObj.name === "Release" && isRecord(configObj.buildSettings)) {
|
|
1845
|
-
for (const [k,
|
|
1846
|
-
if (typeof
|
|
1860
|
+
for (const [k, v5] of Object.entries(configObj.buildSettings)) {
|
|
1861
|
+
if (typeof v5 === "string") settings[k] = v5;
|
|
1847
1862
|
}
|
|
1848
1863
|
}
|
|
1849
1864
|
}
|
|
@@ -1893,6 +1908,19 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
1893
1908
|
const applicationName = identityFieldFrom(settings, plistString(plist3, "CFBundleDisplayName"), void 0) ?? bundleName;
|
|
1894
1909
|
const dictionary = parseInfoPlist(plist3);
|
|
1895
1910
|
if (!isRecord(dictionary)) throw new Error("native app Info.plist is not a dictionary");
|
|
1911
|
+
let keychainAccessGroups;
|
|
1912
|
+
if (settings.CODE_SIGN_ENTITLEMENTS) {
|
|
1913
|
+
const entitlementPath = resolveBuildSetting(settings.CODE_SIGN_ENTITLEMENTS, settings);
|
|
1914
|
+
if (!entitlementPath)
|
|
1915
|
+
throw new Error("CODE_SIGN_ENTITLEMENTS has unresolved build settings");
|
|
1916
|
+
const source = files[`ios/${entitlementPath}`] ?? files[entitlementPath];
|
|
1917
|
+
if (source === void 0)
|
|
1918
|
+
throw new Error(`missing selected entitlement input ${entitlementPath}`);
|
|
1919
|
+
keychainAccessGroups = readKeychainAccessGroups(
|
|
1920
|
+
parseInfoPlist(source),
|
|
1921
|
+
(value) => resolveBuildSetting(value, settings)
|
|
1922
|
+
);
|
|
1923
|
+
}
|
|
1896
1924
|
const declaredDisplayName = dictionary.CFBundleDisplayName;
|
|
1897
1925
|
const applicationDisplayName = typeof declaredDisplayName === "string" ? resolveBuildSetting(declaredDisplayName, settings) : void 0;
|
|
1898
1926
|
if (applicationDisplayName === null)
|
|
@@ -2011,7 +2039,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2011
2039
|
return `${base.startsWith("/") ? "/" : ""}${segments.join("/")}`;
|
|
2012
2040
|
};
|
|
2013
2041
|
const project = Object.values(objects).find(
|
|
2014
|
-
(
|
|
2042
|
+
(object3) => isRecord(object3) && object3.isa === "PBXProject"
|
|
2015
2043
|
);
|
|
2016
2044
|
const projectDir = join8(
|
|
2017
2045
|
pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
|
|
@@ -2025,7 +2053,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2025
2053
|
if (Object.hasOwn(files, file)) return [file];
|
|
2026
2054
|
const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
|
|
2027
2055
|
return paths.filter(
|
|
2028
|
-
(
|
|
2056
|
+
(path38) => path38.startsWith(prefix) && !/(?:^|\/)\./.test(path38.slice(prefix.length))
|
|
2029
2057
|
);
|
|
2030
2058
|
},
|
|
2031
2059
|
join8,
|
|
@@ -2036,7 +2064,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2036
2064
|
}
|
|
2037
2065
|
const rootModuleName = readRootModuleName(
|
|
2038
2066
|
Object.entries(files).filter(
|
|
2039
|
-
([
|
|
2067
|
+
([path38]) => !path38.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path38) || path38.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
|
|
2040
2068
|
).map(([, source]) => source)
|
|
2041
2069
|
);
|
|
2042
2070
|
return {
|
|
@@ -2084,6 +2112,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
|
|
|
2084
2112
|
permissionUsageDescriptions,
|
|
2085
2113
|
infoPlistStrings,
|
|
2086
2114
|
urlQuerySchemes,
|
|
2115
|
+
...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
|
|
2087
2116
|
...shareIntoAppGroupId === void 0 ? {} : { shareIntoAppGroupId },
|
|
2088
2117
|
...rtcAppGroupIdentifier === void 0 ? {} : { rtcAppGroupIdentifier },
|
|
2089
2118
|
...screenShareExtensionBundleId === void 0 ? {} : { screenShareExtensionBundleId },
|
|
@@ -2159,6 +2188,24 @@ function peachsimPackageRoot() {
|
|
|
2159
2188
|
var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
|
|
2160
2189
|
var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
|
|
2161
2190
|
var compilerArchives = {
|
|
2191
|
+
"swift-6.4.0-RELEASE-custom-45bb46301c86fe73": {
|
|
2192
|
+
identity: "45bb46301c86fe73",
|
|
2193
|
+
archive: "tar.gz",
|
|
2194
|
+
hosts: {
|
|
2195
|
+
"darwin-arm64": {
|
|
2196
|
+
checksum: "102dfbbb7b451be0685763b7a427284b75a8078874543f091b1c4b3db86e6565",
|
|
2197
|
+
manifest: "fb6c4d75ef6f4b3c094ae5a4d5d1e6bdfd85431f3fe25d514f3e7a0b4add60ef"
|
|
2198
|
+
},
|
|
2199
|
+
"linux-x64": {
|
|
2200
|
+
checksum: "d3c040e042e12ff787b64bfde1d85238254365036ce093f3b20ff86e8ff996f0",
|
|
2201
|
+
manifest: "7c7144be591692e563396fe3c987c5aa56fbaea4faacaad62283c0c6e5c04ae2"
|
|
2202
|
+
},
|
|
2203
|
+
"linux-arm64": {
|
|
2204
|
+
checksum: "604e6fc5fc0f5a93cee3ca6dfa9616244a2a49ef517caa3155a12ae4a0ecf72b",
|
|
2205
|
+
manifest: "075fd53d03ecf099954f1d023bb4bb67a5c5ee946537466d6c105022bdf8ecde"
|
|
2206
|
+
}
|
|
2207
|
+
}
|
|
2208
|
+
},
|
|
2162
2209
|
"swift-6.4.0-RELEASE-custom-0b2d0a9011c88e66": {
|
|
2163
2210
|
identity: "0b2d0a9011c88e66",
|
|
2164
2211
|
archive: "tar.gz",
|
|
@@ -2442,10 +2489,10 @@ var NATIVE_GRAPH_ID = createHash2("sha256").update(JSON.stringify(NATIVE_GRAPH_I
|
|
|
2442
2489
|
|
|
2443
2490
|
// src/xcode-project.ts
|
|
2444
2491
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2445
|
-
import { execFileSync as
|
|
2446
|
-
import { createHash as
|
|
2447
|
-
import
|
|
2448
|
-
import
|
|
2492
|
+
import { execFileSync as execFileSync15 } from "node:child_process";
|
|
2493
|
+
import { createHash as createHash20 } from "node:crypto";
|
|
2494
|
+
import fs17 from "node:fs";
|
|
2495
|
+
import path36 from "node:path";
|
|
2449
2496
|
import plist2 from "plist";
|
|
2450
2497
|
|
|
2451
2498
|
// src/prepared-xcode-phases.ts
|
|
@@ -2810,19 +2857,19 @@ var assetSymbolSettingKeys = [
|
|
|
2810
2857
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2811
2858
|
import {
|
|
2812
2859
|
execFile as execFile3,
|
|
2813
|
-
execFileSync as
|
|
2860
|
+
execFileSync as execFileSync14
|
|
2814
2861
|
} from "node:child_process";
|
|
2815
|
-
import { createHash as
|
|
2816
|
-
import
|
|
2862
|
+
import { createHash as createHash19 } from "node:crypto";
|
|
2863
|
+
import fs16 from "node:fs";
|
|
2817
2864
|
import os8 from "node:os";
|
|
2818
|
-
import
|
|
2865
|
+
import path34 from "node:path";
|
|
2819
2866
|
import { promisify as promisify3 } from "node:util";
|
|
2820
2867
|
|
|
2821
2868
|
// src/swift-distribution.ts
|
|
2822
2869
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2823
|
-
import
|
|
2870
|
+
import fs15 from "node:fs";
|
|
2824
2871
|
import os7 from "node:os";
|
|
2825
|
-
import
|
|
2872
|
+
import path33 from "node:path";
|
|
2826
2873
|
|
|
2827
2874
|
// ../contrast-runtime-delivery/src/index.ts
|
|
2828
2875
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -2909,29 +2956,29 @@ var CLI_UPDATE_NOTIFICATION_COOLDOWN_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
|
2909
2956
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2910
2957
|
import {
|
|
2911
2958
|
spawn as spawn5,
|
|
2912
|
-
execFileSync as
|
|
2959
|
+
execFileSync as execFileSync13
|
|
2913
2960
|
} from "node:child_process";
|
|
2914
|
-
import { createHash as
|
|
2961
|
+
import { createHash as createHash17, randomUUID as randomUUID5 } from "node:crypto";
|
|
2915
2962
|
import {
|
|
2916
2963
|
copyFileSync,
|
|
2917
2964
|
cpSync,
|
|
2918
2965
|
existsSync as existsSync7,
|
|
2919
2966
|
lstatSync,
|
|
2920
|
-
mkdirSync as
|
|
2967
|
+
mkdirSync as mkdirSync6,
|
|
2921
2968
|
mkdtempSync as mkdtempSync3,
|
|
2922
|
-
readFileSync as
|
|
2969
|
+
readFileSync as readFileSync20,
|
|
2923
2970
|
readdirSync as readdirSync10,
|
|
2924
2971
|
readlinkSync,
|
|
2925
|
-
realpathSync as
|
|
2972
|
+
realpathSync as realpathSync5,
|
|
2926
2973
|
renameSync as renameSync2,
|
|
2927
|
-
rmSync as
|
|
2974
|
+
rmSync as rmSync6,
|
|
2928
2975
|
statSync as statSync3,
|
|
2929
2976
|
symlinkSync as symlinkSync2,
|
|
2930
2977
|
utimesSync,
|
|
2931
|
-
writeFileSync as
|
|
2978
|
+
writeFileSync as writeFileSync8
|
|
2932
2979
|
} from "node:fs";
|
|
2933
2980
|
import os6 from "node:os";
|
|
2934
|
-
import
|
|
2981
|
+
import path30 from "node:path";
|
|
2935
2982
|
|
|
2936
2983
|
// src/admitted-mac-build.ts
|
|
2937
2984
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -2980,78 +3027,142 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
2980
3027
|
// src/swift-foundation.ts
|
|
2981
3028
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2982
3029
|
|
|
2983
|
-
// src/swift-
|
|
3030
|
+
// src/swift-guest-compile.ts
|
|
2984
3031
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2985
|
-
import {
|
|
2986
|
-
import {
|
|
2987
|
-
import
|
|
2988
|
-
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
2989
|
-
import os3 from "node:os";
|
|
2990
|
-
import path16 from "node:path";
|
|
2991
|
-
import { promisify as promisify2 } from "node:util";
|
|
2992
|
-
import { brotliCompress, constants as zlibConstants, gunzip, gzip } from "node:zlib";
|
|
2993
|
-
var run = promisify2(execFile2);
|
|
2994
|
-
var deflate = promisify2(gzip);
|
|
2995
|
-
var compressBrotli = promisify2(brotliCompress);
|
|
2996
|
-
var inflateGzip = promisify2(gunzip);
|
|
3032
|
+
import { execFileSync as execFileSync10 } from "node:child_process";
|
|
3033
|
+
import { mkdirSync as mkdirSync2, readFileSync as readFileSync15, writeFileSync as writeFileSync5 } from "node:fs";
|
|
3034
|
+
import path22 from "node:path";
|
|
2997
3035
|
|
|
2998
|
-
// src/swift-
|
|
3036
|
+
// src/swift-guest-archive.ts
|
|
2999
3037
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3000
|
-
import
|
|
3038
|
+
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
3039
|
+
import { createHash as createHash10 } from "node:crypto";
|
|
3040
|
+
import { mkdirSync, readFileSync as readFileSync11, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
3001
3041
|
import path17 from "node:path";
|
|
3002
3042
|
|
|
3003
|
-
// src/swift-
|
|
3004
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3005
|
-
|
|
3006
|
-
// src/swift-project-user.ts
|
|
3043
|
+
// src/swift-wasm-prune.ts
|
|
3007
3044
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3008
3045
|
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
3009
|
-
import {
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
readFileSync as readFileSync12,
|
|
3015
|
-
realpathSync,
|
|
3016
|
-
rmSync as rmSync3,
|
|
3017
|
-
statSync as statSync2
|
|
3018
|
-
} from "node:fs";
|
|
3019
|
-
import path18 from "node:path";
|
|
3020
|
-
|
|
3021
|
-
// src/swift-reproducible.ts
|
|
3022
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3023
|
-
import { realpathSync as realpathSync2 } from "node:fs";
|
|
3024
|
-
import os4 from "node:os";
|
|
3025
|
-
|
|
3026
|
-
// src/swift-root-lock.ts
|
|
3027
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3028
|
-
import {
|
|
3029
|
-
spawn as spawn4
|
|
3030
|
-
} from "node:child_process";
|
|
3031
|
-
import { createHash as createHash10, randomUUID as randomUUID4 } from "node:crypto";
|
|
3032
|
-
import {
|
|
3033
|
-
linkSync,
|
|
3034
|
-
mkdirSync as mkdirSync2,
|
|
3035
|
-
readdirSync as readdirSync9,
|
|
3036
|
-
readFileSync as readFileSync13,
|
|
3037
|
-
rmSync as rmSync4,
|
|
3038
|
-
writeFileSync as writeFileSync3
|
|
3039
|
-
} from "node:fs";
|
|
3040
|
-
import { homedir as homedir2 } from "node:os";
|
|
3041
|
-
import path19 from "node:path";
|
|
3046
|
+
import { createHash as createHash9 } from "node:crypto";
|
|
3047
|
+
import fs10 from "node:fs";
|
|
3048
|
+
import os3 from "node:os";
|
|
3049
|
+
import path16 from "node:path";
|
|
3050
|
+
import * as v2 from "valibot";
|
|
3042
3051
|
|
|
3043
|
-
// src/
|
|
3052
|
+
// src/swiftRuntimeProductContract.ts
|
|
3044
3053
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3045
|
-
import
|
|
3046
|
-
|
|
3054
|
+
import * as v from "valibot";
|
|
3055
|
+
var swiftFrameworkProductSchema = v.object({
|
|
3056
|
+
version: v.literal(1),
|
|
3057
|
+
packageName: v.string(),
|
|
3058
|
+
manifestSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
|
|
3059
|
+
product: v.object({
|
|
3060
|
+
name: v.string(),
|
|
3061
|
+
linkage: v.picklist(["static", "dynamic", "automatic"]),
|
|
3062
|
+
targets: v.array(v.string())
|
|
3063
|
+
}),
|
|
3064
|
+
// framework names are distinct from SDK library linkNames. they identify
|
|
3065
|
+
// the packaged owner, not an observed native image dependency.
|
|
3066
|
+
frameworkAliases: v.array(
|
|
3067
|
+
v.object({
|
|
3068
|
+
kind: v.literal("framework"),
|
|
3069
|
+
name: v.string(),
|
|
3070
|
+
targets: v.array(v.string()),
|
|
3071
|
+
moduleMap: v.string(),
|
|
3072
|
+
moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
|
|
3073
|
+
wasmSdkId: v.string(),
|
|
3074
|
+
wasmSdkChecksum: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
|
|
3075
|
+
})
|
|
3076
|
+
),
|
|
3077
|
+
targets: v.array(
|
|
3078
|
+
v.object({
|
|
3079
|
+
name: v.string(),
|
|
3080
|
+
path: v.string(),
|
|
3081
|
+
kind: v.picklist(["regular", "system"]),
|
|
3082
|
+
dependencies: v.array(v.string())
|
|
3083
|
+
})
|
|
3084
|
+
),
|
|
3085
|
+
objects: v.array(v.object({ path: v.string(), target: v.string() })),
|
|
3086
|
+
autolink: v.array(v.string())
|
|
3087
|
+
});
|
|
3088
|
+
var swiftSdkProductSchema = v.pipe(
|
|
3089
|
+
v.object({
|
|
3090
|
+
id: v.string(),
|
|
3091
|
+
installName: v.string(),
|
|
3092
|
+
target: v.literal("wasm32-unknown-wasip1"),
|
|
3093
|
+
linkNames: v.array(v.string()),
|
|
3094
|
+
// absent records declare no framework namespace, even when a library name matches.
|
|
3095
|
+
frameworkAliases: v.optional(
|
|
3096
|
+
v.array(
|
|
3097
|
+
v.object({
|
|
3098
|
+
name: v.string(),
|
|
3099
|
+
moduleMap: v.string(),
|
|
3100
|
+
moduleMapSha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
|
|
3101
|
+
})
|
|
3102
|
+
),
|
|
3103
|
+
[]
|
|
3104
|
+
),
|
|
3105
|
+
buildDependencies: v.array(v.string()),
|
|
3106
|
+
linkOwnership: v.picklist(["image", "containing-image"]),
|
|
3107
|
+
linkDependencies: v.nullable(v.array(v.string())),
|
|
3108
|
+
autolink: v.array(v.string()),
|
|
3109
|
+
sources: v.array(
|
|
3110
|
+
v.object({
|
|
3111
|
+
path: v.string(),
|
|
3112
|
+
sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
|
|
3113
|
+
})
|
|
3114
|
+
),
|
|
3115
|
+
artifacts: v.array(
|
|
3116
|
+
v.variant("kind", [
|
|
3117
|
+
v.object({
|
|
3118
|
+
kind: v.literal("archive"),
|
|
3119
|
+
path: v.string(),
|
|
3120
|
+
sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
|
|
3121
|
+
members: v.array(
|
|
3122
|
+
v.object({
|
|
3123
|
+
name: v.string(),
|
|
3124
|
+
ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
|
|
3125
|
+
sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
|
|
3126
|
+
sources: v.array(v.string())
|
|
3127
|
+
})
|
|
3128
|
+
)
|
|
3129
|
+
}),
|
|
3130
|
+
v.object({
|
|
3131
|
+
kind: v.literal("object"),
|
|
3132
|
+
path: v.string(),
|
|
3133
|
+
sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/)),
|
|
3134
|
+
sources: v.array(v.string()),
|
|
3135
|
+
input: v.optional(
|
|
3136
|
+
v.object({
|
|
3137
|
+
product: v.string(),
|
|
3138
|
+
artifact: v.object({
|
|
3139
|
+
path: v.string(),
|
|
3140
|
+
sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
|
|
3141
|
+
}),
|
|
3142
|
+
member: v.optional(
|
|
3143
|
+
v.object({
|
|
3144
|
+
name: v.string(),
|
|
3145
|
+
ordinal: v.pipe(v.number(), v.integer(), v.minValue(1)),
|
|
3146
|
+
sha256: v.pipe(v.string(), v.regex(/^[a-f0-9]{64}$/))
|
|
3147
|
+
})
|
|
3148
|
+
)
|
|
3149
|
+
})
|
|
3150
|
+
)
|
|
3151
|
+
})
|
|
3152
|
+
])
|
|
3153
|
+
)
|
|
3154
|
+
}),
|
|
3155
|
+
v.check(
|
|
3156
|
+
(product) => product.linkOwnership === "image" || product.linkDependencies === null,
|
|
3157
|
+
"containing-image products cannot declare an image scope"
|
|
3158
|
+
)
|
|
3159
|
+
);
|
|
3160
|
+
var swiftSdkProductsSchema = v.object({
|
|
3161
|
+
version: v.literal(1),
|
|
3162
|
+
products: v.array(swiftSdkProductSchema)
|
|
3163
|
+
});
|
|
3047
3164
|
|
|
3048
3165
|
// src/swift-wasm-prune.ts
|
|
3049
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3050
|
-
import { execFileSync as execFileSync7 } from "node:child_process";
|
|
3051
|
-
import { createHash as createHash11 } from "node:crypto";
|
|
3052
|
-
import fs11 from "node:fs";
|
|
3053
|
-
import os5 from "node:os";
|
|
3054
|
-
import path21 from "node:path";
|
|
3055
3166
|
var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
|
|
3056
3167
|
"libFoundation",
|
|
3057
3168
|
"lib_FoundationCollections",
|
|
@@ -3071,12 +3182,83 @@ var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
|
|
|
3071
3182
|
"-lswift_Concurrency"
|
|
3072
3183
|
]);
|
|
3073
3184
|
|
|
3074
|
-
// src/
|
|
3185
|
+
// src/swift-guest-link.ts
|
|
3186
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3187
|
+
import { execFileSync as execFileSync7 } from "node:child_process";
|
|
3188
|
+
import fs11 from "node:fs";
|
|
3189
|
+
import path20 from "node:path";
|
|
3190
|
+
import { StringDecoder } from "node:string_decoder";
|
|
3191
|
+
|
|
3192
|
+
// src/swift-guest-image-ledger.ts
|
|
3075
3193
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3076
3194
|
|
|
3077
|
-
// src/
|
|
3195
|
+
// src/swift-guest-link-plan.ts
|
|
3196
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3197
|
+
|
|
3198
|
+
// src/swift-guest-manifest.ts
|
|
3199
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3200
|
+
import { createHash as createHash11 } from "node:crypto";
|
|
3201
|
+
import { readFileSync as readFileSync12 } from "node:fs";
|
|
3202
|
+
|
|
3203
|
+
// src/swift-guest-projection-storage.ts
|
|
3204
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3205
|
+
|
|
3206
|
+
// src/swift-guest-linked-spans.ts
|
|
3207
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3208
|
+
|
|
3209
|
+
// src/swift-guest-projection.ts
|
|
3210
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3211
|
+
|
|
3212
|
+
// src/swiftGuestImageContract.ts
|
|
3213
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3214
|
+
|
|
3215
|
+
// src/swift-guest-projection-storage.ts
|
|
3216
|
+
var maxProjectionRegions = 1 << 20;
|
|
3217
|
+
|
|
3218
|
+
// src/swift-guest-runtime-plan.ts
|
|
3219
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3220
|
+
import { createHash as createHash13 } from "node:crypto";
|
|
3221
|
+
import { readFileSync as readFileSync13, realpathSync } from "node:fs";
|
|
3222
|
+
import path19 from "node:path";
|
|
3223
|
+
import * as v4 from "valibot";
|
|
3224
|
+
|
|
3225
|
+
// src/swift-guest-source-plan.ts
|
|
3226
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3227
|
+
import path18 from "node:path";
|
|
3228
|
+
|
|
3229
|
+
// src/swift-runtime-products.ts
|
|
3230
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3231
|
+
import { createHash as createHash12 } from "node:crypto";
|
|
3232
|
+
import * as v3 from "valibot";
|
|
3233
|
+
var packageSchema = v3.object({
|
|
3234
|
+
name: v3.string(),
|
|
3235
|
+
products: v3.array(
|
|
3236
|
+
v3.object({
|
|
3237
|
+
name: v3.string(),
|
|
3238
|
+
targets: v3.array(v3.string()),
|
|
3239
|
+
type: v3.unknown()
|
|
3240
|
+
})
|
|
3241
|
+
),
|
|
3242
|
+
targets: v3.array(
|
|
3243
|
+
v3.object({
|
|
3244
|
+
name: v3.string(),
|
|
3245
|
+
type: v3.string(),
|
|
3246
|
+
path: v3.optional(v3.string()),
|
|
3247
|
+
dependencies: v3.array(v3.unknown())
|
|
3248
|
+
})
|
|
3249
|
+
)
|
|
3250
|
+
});
|
|
3251
|
+
|
|
3252
|
+
// src/swift-guest-source-inputs.ts
|
|
3078
3253
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3079
3254
|
import { execFileSync as execFileSync8 } from "node:child_process";
|
|
3255
|
+
import { createHash as createHash14 } from "node:crypto";
|
|
3256
|
+
import { readFileSync as readFileSync14, realpathSync as realpathSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
3257
|
+
import path21 from "node:path";
|
|
3258
|
+
|
|
3259
|
+
// src/wasm-optimize.ts
|
|
3260
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3261
|
+
import { execFileSync as execFileSync9 } from "node:child_process";
|
|
3080
3262
|
import { BinaryNotFoundError, BINARYEN_VERSION, wasmOpt } from "wasm-opt";
|
|
3081
3263
|
var FEATURES = [
|
|
3082
3264
|
"threads",
|
|
@@ -3092,15 +3274,83 @@ var FEATURES = [
|
|
|
3092
3274
|
];
|
|
3093
3275
|
var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
|
|
3094
3276
|
|
|
3277
|
+
// src/swift-icu.ts
|
|
3278
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3279
|
+
import { execFile as execFile2 } from "node:child_process";
|
|
3280
|
+
import { createHash as createHash15, randomUUID as randomUUID3 } from "node:crypto";
|
|
3281
|
+
import { existsSync as existsSync4, readFileSync as readFileSync16 } from "node:fs";
|
|
3282
|
+
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
3283
|
+
import os4 from "node:os";
|
|
3284
|
+
import path23 from "node:path";
|
|
3285
|
+
import { promisify as promisify2 } from "node:util";
|
|
3286
|
+
import { brotliCompress, constants as zlibConstants, gunzip, gzip } from "node:zlib";
|
|
3287
|
+
var run = promisify2(execFile2);
|
|
3288
|
+
var deflate = promisify2(gzip);
|
|
3289
|
+
var compressBrotli = promisify2(brotliCompress);
|
|
3290
|
+
var inflateGzip = promisify2(gunzip);
|
|
3291
|
+
|
|
3292
|
+
// src/swift-link-roots.ts
|
|
3293
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3294
|
+
import fs12 from "node:fs";
|
|
3295
|
+
import path24 from "node:path";
|
|
3296
|
+
|
|
3297
|
+
// src/swift-objc-import.ts
|
|
3298
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3299
|
+
|
|
3300
|
+
// src/swift-project-user.ts
|
|
3301
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3302
|
+
import { execFileSync as execFileSync11 } from "node:child_process";
|
|
3303
|
+
import {
|
|
3304
|
+
chmodSync,
|
|
3305
|
+
existsSync as existsSync5,
|
|
3306
|
+
mkdirSync as mkdirSync3,
|
|
3307
|
+
readdirSync as readdirSync8,
|
|
3308
|
+
readFileSync as readFileSync17,
|
|
3309
|
+
realpathSync as realpathSync3,
|
|
3310
|
+
rmSync as rmSync4,
|
|
3311
|
+
statSync as statSync2
|
|
3312
|
+
} from "node:fs";
|
|
3313
|
+
import path25 from "node:path";
|
|
3314
|
+
|
|
3315
|
+
// src/swift-reproducible.ts
|
|
3316
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3317
|
+
import { realpathSync as realpathSync4 } from "node:fs";
|
|
3318
|
+
import os5 from "node:os";
|
|
3319
|
+
|
|
3320
|
+
// src/swift-root-lock.ts
|
|
3321
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3322
|
+
import {
|
|
3323
|
+
spawn as spawn4
|
|
3324
|
+
} from "node:child_process";
|
|
3325
|
+
import { createHash as createHash16, randomUUID as randomUUID4 } from "node:crypto";
|
|
3326
|
+
import {
|
|
3327
|
+
linkSync,
|
|
3328
|
+
mkdirSync as mkdirSync4,
|
|
3329
|
+
readdirSync as readdirSync9,
|
|
3330
|
+
readFileSync as readFileSync18,
|
|
3331
|
+
rmSync as rmSync5,
|
|
3332
|
+
writeFileSync as writeFileSync6
|
|
3333
|
+
} from "node:fs";
|
|
3334
|
+
import { homedir as homedir2 } from "node:os";
|
|
3335
|
+
import path26 from "node:path";
|
|
3336
|
+
|
|
3337
|
+
// src/swift-uniform-type-constants.ts
|
|
3338
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3339
|
+
import { execFileSync as execFileSync12 } from "node:child_process";
|
|
3340
|
+
import path27 from "node:path";
|
|
3341
|
+
|
|
3342
|
+
// src/swiftContract.ts
|
|
3343
|
+
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3344
|
+
|
|
3095
3345
|
// src/write-build-file.ts
|
|
3096
3346
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3097
|
-
import { existsSync as existsSync6, mkdirSync as
|
|
3098
|
-
import
|
|
3347
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync19, writeFileSync as writeFileSync7 } from "node:fs";
|
|
3348
|
+
import path28 from "node:path";
|
|
3099
3349
|
|
|
3100
3350
|
// src/xcode-header-search.ts
|
|
3101
3351
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3102
|
-
import
|
|
3103
|
-
import
|
|
3352
|
+
import fs13 from "node:fs";
|
|
3353
|
+
import path29 from "node:path";
|
|
3104
3354
|
|
|
3105
3355
|
// src/swift-compile.ts
|
|
3106
3356
|
var admittedCores = Number(process.env.TM_EXEC_CPU_CORES);
|
|
@@ -3182,7 +3432,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
|
|
|
3182
3432
|
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
3183
3433
|
(module) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module}"`
|
|
3184
3434
|
).join("");
|
|
3185
|
-
var compilerSourceDigest = true ? "
|
|
3435
|
+
var compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
3186
3436
|
var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
3187
3437
|
"CFAllocator",
|
|
3188
3438
|
"CFArray",
|
|
@@ -3212,32 +3462,32 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
3212
3462
|
|
|
3213
3463
|
// src/answeredNativePackages.ts
|
|
3214
3464
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3215
|
-
import { readFileSync as
|
|
3465
|
+
import { readFileSync as readFileSync21 } from "node:fs";
|
|
3216
3466
|
import { join as join7 } from "node:path";
|
|
3217
3467
|
|
|
3218
3468
|
// src/runtime-assets.ts
|
|
3219
3469
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3220
|
-
import
|
|
3221
|
-
import
|
|
3470
|
+
import fs14 from "fs";
|
|
3471
|
+
import path31 from "path";
|
|
3222
3472
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
3223
3473
|
|
|
3224
3474
|
// src/nitroAdapterContract.ts
|
|
3225
3475
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3226
|
-
import { createHash as
|
|
3227
|
-
import { readdirSync as readdirSync11, readFileSync as
|
|
3228
|
-
import
|
|
3476
|
+
import { createHash as createHash18 } from "node:crypto";
|
|
3477
|
+
import { readdirSync as readdirSync11, readFileSync as readFileSync22 } from "node:fs";
|
|
3478
|
+
import path32 from "node:path";
|
|
3229
3479
|
|
|
3230
3480
|
// src/swiftNativePinContract.ts
|
|
3231
3481
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3232
3482
|
|
|
3233
3483
|
// src/swift-package-manifest.ts
|
|
3234
|
-
var cacheDir3 =
|
|
3484
|
+
var cacheDir3 = path34.join(cacheDir(), "swift-manifests");
|
|
3235
3485
|
var execFileAsync = promisify3(execFile3);
|
|
3236
3486
|
|
|
3237
3487
|
// src/xcode-json-project.ts
|
|
3238
3488
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3239
3489
|
var import_json5 = __toESM(require_lib(), 1);
|
|
3240
|
-
import
|
|
3490
|
+
import path35 from "node:path";
|
|
3241
3491
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3242
3492
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
3243
3493
|
var items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -3294,7 +3544,7 @@ var PHASE_ISA = {
|
|
|
3294
3544
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
3295
3545
|
const json = import_json5.default.parse(source);
|
|
3296
3546
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
3297
|
-
const projectDir =
|
|
3547
|
+
const projectDir = path35.dirname(xcodeproj);
|
|
3298
3548
|
const objects = {};
|
|
3299
3549
|
let next = 0;
|
|
3300
3550
|
const add = (entry, id) => {
|
|
@@ -3307,7 +3557,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3307
3557
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
3308
3558
|
if (base) {
|
|
3309
3559
|
if (base[1] === "PROJECT")
|
|
3310
|
-
return { sourceTree: "<absolute>", path:
|
|
3560
|
+
return { sourceTree: "<absolute>", path: path35.join(projectDir, base[2]) };
|
|
3311
3561
|
if (base[1] === "PRODUCTS")
|
|
3312
3562
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
3313
3563
|
return null;
|
|
@@ -3315,7 +3565,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3315
3565
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
3316
3566
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
3317
3567
|
if (unescaped.startsWith("~")) return null;
|
|
3318
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
3568
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: path35.join(groupDir, unescaped) };
|
|
3319
3569
|
};
|
|
3320
3570
|
const memberships = [];
|
|
3321
3571
|
const folders = [];
|
|
@@ -3326,7 +3576,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3326
3576
|
const kind = text(entry.kind) ?? "file-reference";
|
|
3327
3577
|
const raw = text(entry.path) ?? "";
|
|
3328
3578
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
3329
|
-
const name2 = text(entry.name) ??
|
|
3579
|
+
const name2 = text(entry.name) ?? path35.basename(raw);
|
|
3330
3580
|
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
3331
3581
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
3332
3582
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -3447,7 +3697,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3447
3697
|
if (!isObject(entry)) continue;
|
|
3448
3698
|
const repository = text(entry.repository);
|
|
3449
3699
|
const local = text(entry.path);
|
|
3450
|
-
const name2 = local !== void 0 ?
|
|
3700
|
+
const name2 = local !== void 0 ? path35.basename(path35.resolve(path35.dirname(xcodeproj), local)) : path35.basename(repository ?? "").replace(/\.git$/, "");
|
|
3451
3701
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
3452
3702
|
isa: "XCRemoteSwiftPackageReference",
|
|
3453
3703
|
repositoryURL: repository ?? "",
|
|
@@ -3640,6 +3890,16 @@ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
|
|
|
3640
3890
|
]);
|
|
3641
3891
|
var APPLICATION = "com.apple.product-type.application";
|
|
3642
3892
|
var RESOURCE_BUNDLE = "com.apple.product-type.bundle";
|
|
3893
|
+
var PRODUCT_MACH_O_TYPES = {
|
|
3894
|
+
"com.apple.product-type.application": "mh_execute",
|
|
3895
|
+
"com.apple.product-type.app-extension": "mh_execute",
|
|
3896
|
+
"com.apple.product-type.tool": "mh_execute",
|
|
3897
|
+
"com.apple.product-type.framework": "mh_dylib",
|
|
3898
|
+
"com.apple.product-type.framework.static": "staticlib",
|
|
3899
|
+
"com.apple.product-type.library.dynamic": "mh_dylib",
|
|
3900
|
+
"com.apple.product-type.library.static": "staticlib",
|
|
3901
|
+
"com.apple.product-type.bundle": "mh_bundle"
|
|
3902
|
+
};
|
|
3643
3903
|
var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
|
|
3644
3904
|
"com.apple.product-type.framework",
|
|
3645
3905
|
"com.apple.product-type.framework.static"
|
|
@@ -3657,28 +3917,28 @@ var CONDITIONS = {
|
|
|
3657
3917
|
variant: "normal"
|
|
3658
3918
|
};
|
|
3659
3919
|
function walkFiles(dir) {
|
|
3660
|
-
if (!
|
|
3920
|
+
if (!fs17.existsSync(dir)) return [];
|
|
3661
3921
|
const out = [];
|
|
3662
|
-
for (const entry of
|
|
3922
|
+
for (const entry of fs17.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
3663
3923
|
if (entry.name.startsWith(".")) continue;
|
|
3664
|
-
const full =
|
|
3924
|
+
const full = path36.join(dir, entry.name);
|
|
3665
3925
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
3666
3926
|
else if (entry.isFile()) out.push(full);
|
|
3667
3927
|
}
|
|
3668
3928
|
return out;
|
|
3669
3929
|
}
|
|
3670
|
-
var isDirectory = (dir) =>
|
|
3930
|
+
var isDirectory = (dir) => fs17.existsSync(dir) && fs17.statSync(dir).isDirectory();
|
|
3671
3931
|
function readXcconfig(file, read) {
|
|
3672
|
-
if (read.includes(file) || !
|
|
3932
|
+
if (read.includes(file) || !fs17.existsSync(file)) return {};
|
|
3673
3933
|
read.push(file);
|
|
3674
3934
|
const settings = {};
|
|
3675
|
-
for (const raw of
|
|
3935
|
+
for (const raw of fs17.readFileSync(file, "utf8").split("\n")) {
|
|
3676
3936
|
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
3677
3937
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
3678
3938
|
if (include) {
|
|
3679
3939
|
Object.assign(
|
|
3680
3940
|
settings,
|
|
3681
|
-
readXcconfig(
|
|
3941
|
+
readXcconfig(path36.resolve(path36.dirname(file), include[1]), read)
|
|
3682
3942
|
);
|
|
3683
3943
|
continue;
|
|
3684
3944
|
}
|
|
@@ -3728,22 +3988,22 @@ function decodeXml(text2) {
|
|
|
3728
3988
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
3729
3989
|
}
|
|
3730
3990
|
function workspaceReferences(workspace) {
|
|
3731
|
-
const data =
|
|
3732
|
-
if (!
|
|
3991
|
+
const data = path36.join(workspace, "contents.xcworkspacedata");
|
|
3992
|
+
if (!fs17.existsSync(data))
|
|
3733
3993
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
3734
|
-
const container =
|
|
3994
|
+
const container = path36.dirname(workspace);
|
|
3735
3995
|
const locate = (location, base) => {
|
|
3736
3996
|
const colon = location.indexOf(":");
|
|
3737
3997
|
const kind = location.slice(0, colon);
|
|
3738
3998
|
const rest = location.slice(colon + 1);
|
|
3739
|
-
if (kind === "group") return
|
|
3740
|
-
if (kind === "container" || kind === "self") return
|
|
3741
|
-
if (kind === "absolute") return
|
|
3742
|
-
throw new Error(`${
|
|
3999
|
+
if (kind === "group") return path36.resolve(base, rest);
|
|
4000
|
+
if (kind === "container" || kind === "self") return path36.resolve(container, rest);
|
|
4001
|
+
if (kind === "absolute") return path36.resolve(rest);
|
|
4002
|
+
throw new Error(`${path36.basename(workspace)} has an unsupported location ${location}`);
|
|
3743
4003
|
};
|
|
3744
4004
|
const groups = [container];
|
|
3745
4005
|
const references = [];
|
|
3746
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
4006
|
+
for (const [, closing, tag, attributes, selfClosing] of fs17.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
3747
4007
|
if (closing) {
|
|
3748
4008
|
if (tag === "Group") groups.pop();
|
|
3749
4009
|
continue;
|
|
@@ -3794,8 +4054,8 @@ function remotePackageRequirements(projects) {
|
|
|
3794
4054
|
var loaded = /* @__PURE__ */ new Map();
|
|
3795
4055
|
function xcodeProjectFile(xcodeproj) {
|
|
3796
4056
|
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
3797
|
-
const file =
|
|
3798
|
-
if (
|
|
4057
|
+
const file = path36.join(xcodeproj, name2);
|
|
4058
|
+
if (fs17.existsSync(file)) return file;
|
|
3799
4059
|
}
|
|
3800
4060
|
return null;
|
|
3801
4061
|
}
|
|
@@ -3803,8 +4063,8 @@ function loadProject(xcodeproj) {
|
|
|
3803
4063
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
3804
4064
|
if (!projectFile)
|
|
3805
4065
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
3806
|
-
const source =
|
|
3807
|
-
const digest =
|
|
4066
|
+
const source = fs17.readFileSync(projectFile, "utf8");
|
|
4067
|
+
const digest = createHash20("sha256").update(source).digest("hex");
|
|
3808
4068
|
const cached = loaded.get(projectFile);
|
|
3809
4069
|
if (cached?.digest === digest) return cached.project;
|
|
3810
4070
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -3812,25 +4072,25 @@ function loadProject(xcodeproj) {
|
|
|
3812
4072
|
throw new Error(`${projectFile} has no objects table`);
|
|
3813
4073
|
}
|
|
3814
4074
|
const objects = root.objects;
|
|
3815
|
-
const
|
|
4075
|
+
const object3 = (id) => {
|
|
3816
4076
|
const found = id === void 0 ? void 0 : objects[id];
|
|
3817
4077
|
return isDict(found) ? found : void 0;
|
|
3818
4078
|
};
|
|
3819
|
-
const project =
|
|
4079
|
+
const project = object3(str(root.rootObject));
|
|
3820
4080
|
if (!project || project.isa !== "PBXProject") {
|
|
3821
4081
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
3822
4082
|
}
|
|
3823
|
-
const projectDir =
|
|
3824
|
-
|
|
4083
|
+
const projectDir = fs17.realpathSync(
|
|
4084
|
+
path36.resolve(path36.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
3825
4085
|
);
|
|
3826
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
4086
|
+
const resolvePath = xcodePathResolver(objects, projectDir, path36.join);
|
|
3827
4087
|
const result = {
|
|
3828
4088
|
xcodeproj,
|
|
3829
4089
|
projectFile,
|
|
3830
4090
|
objects,
|
|
3831
4091
|
project,
|
|
3832
4092
|
projectDir,
|
|
3833
|
-
object,
|
|
4093
|
+
object: object3,
|
|
3834
4094
|
resolvePath,
|
|
3835
4095
|
visitMembers: xcodeTargetMemberVisitor(objects)
|
|
3836
4096
|
};
|
|
@@ -3860,8 +4120,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3860
4120
|
const relative2 = str(config.baseConfigurationReferenceRelativePath);
|
|
3861
4121
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
3862
4122
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
3863
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative2 ?
|
|
3864
|
-
if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !
|
|
4123
|
+
const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path36.resolve(directory, relative2) : null;
|
|
4124
|
+
if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !fs17.existsSync(baseFile)))
|
|
3865
4125
|
throw new Error(
|
|
3866
4126
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
|
|
3867
4127
|
);
|
|
@@ -3907,7 +4167,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3907
4167
|
const derivedSettings = {
|
|
3908
4168
|
DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? (developerDir ?? (developerDir = process.platform === "darwin" ? (
|
|
3909
4169
|
// runner-toolchain-platform: darwin
|
|
3910
|
-
|
|
4170
|
+
execFileSync15("xcode-select", ["-p"], {
|
|
3911
4171
|
encoding: "utf8",
|
|
3912
4172
|
stdio: ["ignore", "pipe", "pipe"]
|
|
3913
4173
|
}).trim()
|
|
@@ -3915,6 +4175,11 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3915
4175
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
3916
4176
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
3917
4177
|
EXECUTABLE_NAME: () => get("PRODUCT_NAME"),
|
|
4178
|
+
MACH_O_TYPE: () => PRODUCT_MACH_O_TYPES[str(target.productType) ?? ""] ?? "",
|
|
4179
|
+
// the native defaults of CoreBuildSystem.xcspec for a dynamic framework
|
|
4180
|
+
EXECUTABLE_PATH: () => FRAMEWORK_PRODUCTS.has(str(target.productType) ?? "") ? `${get("PRODUCT_NAME")}.framework/${get("EXECUTABLE_NAME")}` : get("EXECUTABLE_NAME"),
|
|
4181
|
+
DYLIB_INSTALL_NAME_BASE: () => "/Library/Frameworks",
|
|
4182
|
+
LD_DYLIB_INSTALL_NAME: () => get("MACH_O_TYPE") === "mh_dylib" ? `${get("DYLIB_INSTALL_NAME_BASE")}/${get("EXECUTABLE_PATH")}` : "",
|
|
3918
4183
|
// the native default of CoreBuildSystem.xcspec
|
|
3919
4184
|
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES: () => "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
|
|
3920
4185
|
};
|
|
@@ -3954,26 +4219,26 @@ function scriptCommand(shell, script) {
|
|
|
3954
4219
|
return [executable, ...args, "-c", script];
|
|
3955
4220
|
}
|
|
3956
4221
|
function expandSearchPath(directory, rules2) {
|
|
3957
|
-
if (
|
|
4222
|
+
if (path36.basename(directory) !== "**") return [directory];
|
|
3958
4223
|
const expanded = [];
|
|
3959
4224
|
const seen = /* @__PURE__ */ new Set();
|
|
3960
|
-
const queue = [
|
|
4225
|
+
const queue = [path36.dirname(directory)];
|
|
3961
4226
|
for (let at = 0; at < queue.length; at++) {
|
|
3962
4227
|
const current = queue[at];
|
|
3963
4228
|
let real;
|
|
3964
4229
|
try {
|
|
3965
|
-
real =
|
|
4230
|
+
real = fs17.realpathSync(current);
|
|
3966
4231
|
} catch {
|
|
3967
4232
|
continue;
|
|
3968
4233
|
}
|
|
3969
|
-
if (!
|
|
4234
|
+
if (!fs17.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
3970
4235
|
seen.add(real);
|
|
3971
4236
|
expanded.push(current);
|
|
3972
|
-
for (const entry of
|
|
4237
|
+
for (const entry of fs17.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
3973
4238
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
3974
4239
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
3975
4240
|
continue;
|
|
3976
|
-
queue.push(
|
|
4241
|
+
queue.push(path36.join(current, entry.name));
|
|
3977
4242
|
}
|
|
3978
4243
|
}
|
|
3979
4244
|
return expanded;
|
|
@@ -4044,7 +4309,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
4044
4309
|
for (const token of tokens) {
|
|
4045
4310
|
if (token.startsWith("-")) break;
|
|
4046
4311
|
const file = resolve(token);
|
|
4047
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
4312
|
+
if (file?.endsWith(".xcassets")) catalogs.push(path36.resolve(projectDir, file));
|
|
4048
4313
|
}
|
|
4049
4314
|
}
|
|
4050
4315
|
return catalogs;
|
|
@@ -4089,14 +4354,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
4089
4354
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
4090
4355
|
return [];
|
|
4091
4356
|
copies.push({
|
|
4092
|
-
from:
|
|
4093
|
-
to:
|
|
4357
|
+
from: path36.resolve(projectDir, operands[0]),
|
|
4358
|
+
to: path36.resolve(projectDir, operands[1])
|
|
4094
4359
|
});
|
|
4095
4360
|
}
|
|
4096
4361
|
return copies;
|
|
4097
4362
|
}
|
|
4098
4363
|
function fileListEntries(file, absolute) {
|
|
4099
|
-
return
|
|
4364
|
+
return fs17.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
4100
4365
|
}
|
|
4101
4366
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
4102
4367
|
const { project, target, id: targetId } = ref;
|
|
@@ -4109,7 +4374,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4109
4374
|
const copiedFiles = [];
|
|
4110
4375
|
let generatedInfoPlist = false;
|
|
4111
4376
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
4112
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
4377
|
+
const infoPlistOutput = declaredInfoPlist ? path36.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
4113
4378
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
4114
4379
|
for (const phaseId of list(target.buildPhases)) {
|
|
4115
4380
|
const phase = project.object(phaseId);
|
|
@@ -4124,7 +4389,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4124
4389
|
copiedFiles.push(
|
|
4125
4390
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
4126
4391
|
);
|
|
4127
|
-
const absolute = (raw) =>
|
|
4392
|
+
const absolute = (raw) => path36.resolve(project.projectDir, expand(raw, settings));
|
|
4128
4393
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
4129
4394
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
4130
4395
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -4133,7 +4398,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4133
4398
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
4134
4399
|
).map((raw) => {
|
|
4135
4400
|
const file = absolute(raw);
|
|
4136
|
-
if (!
|
|
4401
|
+
if (!fs17.existsSync(file)) {
|
|
4137
4402
|
return { file, entries: [] };
|
|
4138
4403
|
}
|
|
4139
4404
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -4154,7 +4419,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4154
4419
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
4155
4420
|
];
|
|
4156
4421
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
4157
|
-
for (const file of inputFiles) if (
|
|
4422
|
+
for (const file of inputFiles) if (fs17.existsSync(file)) projectInputs.add(file);
|
|
4158
4423
|
}
|
|
4159
4424
|
if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
4160
4425
|
const configuration = settings("CONFIGURATION");
|
|
@@ -4167,10 +4432,10 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4167
4432
|
false
|
|
4168
4433
|
))
|
|
4169
4434
|
continue;
|
|
4170
|
-
const phaseDir =
|
|
4435
|
+
const phaseDir = path36.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
4171
4436
|
for (const lists of fileLists.values())
|
|
4172
4437
|
for (const { file } of lists)
|
|
4173
|
-
if (!
|
|
4438
|
+
if (!fs17.existsSync(file))
|
|
4174
4439
|
throw new Error(
|
|
4175
4440
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
4176
4441
|
);
|
|
@@ -4189,25 +4454,25 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4189
4454
|
const lists = fileLists.get(kind);
|
|
4190
4455
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
4191
4456
|
lists.forEach((_item, index) => {
|
|
4192
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
4457
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path36.join(
|
|
4193
4458
|
phaseDir,
|
|
4194
4459
|
`${kind}-${index}.xcfilelist`
|
|
4195
4460
|
);
|
|
4196
4461
|
});
|
|
4197
4462
|
}
|
|
4198
|
-
const signature =
|
|
4463
|
+
const signature = createHash20("sha256").update(
|
|
4199
4464
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
4200
4465
|
);
|
|
4201
4466
|
for (const file of inputFiles) {
|
|
4202
4467
|
signature.update(file);
|
|
4203
|
-
if (
|
|
4204
|
-
const stat =
|
|
4468
|
+
if (fs17.existsSync(file)) {
|
|
4469
|
+
const stat = fs17.statSync(file);
|
|
4205
4470
|
signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
|
|
4206
4471
|
} else signature.update("missing");
|
|
4207
4472
|
}
|
|
4208
4473
|
const stamp = signature.digest("hex");
|
|
4209
4474
|
const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
4210
|
-
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) =>
|
|
4475
|
+
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs17.existsSync(file))) {
|
|
4211
4476
|
preparedXcodePhase(
|
|
4212
4477
|
project.projectFile,
|
|
4213
4478
|
targetId,
|
|
@@ -4218,14 +4483,14 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4218
4483
|
);
|
|
4219
4484
|
continue;
|
|
4220
4485
|
}
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4486
|
+
fs17.mkdirSync(phaseDir, { recursive: true });
|
|
4487
|
+
fs17.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
4488
|
+
fs17.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
4224
4489
|
for (const output2 of allOutputs)
|
|
4225
|
-
|
|
4490
|
+
fs17.mkdirSync(path36.dirname(output2), { recursive: true });
|
|
4226
4491
|
for (const [kind, lists] of fileLists)
|
|
4227
4492
|
lists.forEach((item, index) => {
|
|
4228
|
-
|
|
4493
|
+
fs17.writeFileSync(
|
|
4229
4494
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
4230
4495
|
`${item.entries.join("\n")}
|
|
4231
4496
|
`
|
|
@@ -4236,7 +4501,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4236
4501
|
str(phase.shellPath) ?? "/bin/sh",
|
|
4237
4502
|
str(phase.shellScript) ?? ""
|
|
4238
4503
|
);
|
|
4239
|
-
|
|
4504
|
+
execFileSync15(shell, args, {
|
|
4240
4505
|
cwd: project.projectDir,
|
|
4241
4506
|
env,
|
|
4242
4507
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -4252,7 +4517,7 @@ ${output2}`
|
|
|
4252
4517
|
);
|
|
4253
4518
|
}
|
|
4254
4519
|
const missing = allOutputs.filter(
|
|
4255
|
-
(file) => file === infoPlistOutput && !
|
|
4520
|
+
(file) => file === infoPlistOutput && !fs17.existsSync(file)
|
|
4256
4521
|
);
|
|
4257
4522
|
if (missing.length > 0)
|
|
4258
4523
|
throw new Error(
|
|
@@ -4272,8 +4537,8 @@ ${output2}`
|
|
|
4272
4537
|
project.visitMembers(
|
|
4273
4538
|
targetId,
|
|
4274
4539
|
project.resolvePath,
|
|
4275
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
4276
|
-
|
|
4540
|
+
(file) => isDirectory(file) ? walkFiles(file) : fs17.existsSync(file) ? [file] : [],
|
|
4541
|
+
path36.join,
|
|
4277
4542
|
(file, kind) => {
|
|
4278
4543
|
if (kind === "header") {
|
|
4279
4544
|
headers.add(file);
|
|
@@ -4283,9 +4548,9 @@ ${output2}`
|
|
|
4283
4548
|
resources.add(file);
|
|
4284
4549
|
return;
|
|
4285
4550
|
}
|
|
4286
|
-
if (!
|
|
4551
|
+
if (!fs17.existsSync(file)) {
|
|
4287
4552
|
if (options.requireSources === false) return;
|
|
4288
|
-
const script = scriptForOutput.get(
|
|
4553
|
+
const script = scriptForOutput.get(path36.normalize(file));
|
|
4289
4554
|
throw new Error(
|
|
4290
4555
|
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}`
|
|
4291
4556
|
);
|
|
@@ -4306,37 +4571,37 @@ ${output2}`
|
|
|
4306
4571
|
function commonAncestor(dirs) {
|
|
4307
4572
|
let common = dirs[0];
|
|
4308
4573
|
for (const dir of dirs) {
|
|
4309
|
-
while (common !==
|
|
4310
|
-
common =
|
|
4574
|
+
while (common !== path36.dirname(common) && path36.relative(common, dir).startsWith(".."))
|
|
4575
|
+
common = path36.dirname(common);
|
|
4311
4576
|
}
|
|
4312
4577
|
return common;
|
|
4313
4578
|
}
|
|
4314
|
-
var isPodsProject = (xcodeproj) =>
|
|
4579
|
+
var isPodsProject = (xcodeproj) => path36.basename(xcodeproj) === "Pods.xcodeproj" && path36.basename(path36.dirname(xcodeproj)) === "Pods";
|
|
4315
4580
|
function installedPodsSandbox(pods) {
|
|
4316
|
-
const podfileLock =
|
|
4317
|
-
const manifestLock =
|
|
4318
|
-
if (!
|
|
4581
|
+
const podfileLock = path36.join(path36.dirname(pods), "Podfile.lock");
|
|
4582
|
+
const manifestLock = path36.join(pods, "Manifest.lock");
|
|
4583
|
+
if (!fs17.existsSync(podfileLock))
|
|
4319
4584
|
throw new Error(
|
|
4320
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
4585
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${path36.dirname(pods)}`
|
|
4321
4586
|
);
|
|
4322
|
-
if (!
|
|
4587
|
+
if (!fs17.existsSync(manifestLock) || !fs17.readFileSync(manifestLock).equals(fs17.readFileSync(podfileLock)))
|
|
4323
4588
|
throw new Error(
|
|
4324
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
4589
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path36.dirname(pods)}`
|
|
4325
4590
|
);
|
|
4326
4591
|
const specChecksums = {};
|
|
4327
|
-
const lines =
|
|
4592
|
+
const lines = fs17.readFileSync(manifestLock, "utf8").split("\n");
|
|
4328
4593
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
4329
4594
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
4330
4595
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
4331
4596
|
if (!entry) break;
|
|
4332
4597
|
specChecksums[entry[1]] = entry[2];
|
|
4333
4598
|
}
|
|
4334
|
-
const specs =
|
|
4599
|
+
const specs = path36.join(pods, "Local Podspecs");
|
|
4335
4600
|
return {
|
|
4336
4601
|
podfileLock,
|
|
4337
4602
|
manifestLock,
|
|
4338
4603
|
specChecksums,
|
|
4339
|
-
localPodspecs: isDirectory(specs) ?
|
|
4604
|
+
localPodspecs: isDirectory(specs) ? fs17.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => path36.join(specs, name2)) : []
|
|
4340
4605
|
};
|
|
4341
4606
|
}
|
|
4342
4607
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -4348,14 +4613,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
4348
4613
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
4349
4614
|
if (installedPods && isPodsProject(xcodeproj))
|
|
4350
4615
|
throw new Error(
|
|
4351
|
-
`${
|
|
4616
|
+
`${path36.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path36.dirname(path36.dirname(xcodeproj))}`
|
|
4352
4617
|
);
|
|
4353
4618
|
return;
|
|
4354
4619
|
}
|
|
4355
|
-
const key =
|
|
4356
|
-
if (projectAt.has(key) || !installedPods && key.split(
|
|
4620
|
+
const key = fs17.realpathSync(xcodeproj);
|
|
4621
|
+
if (projectAt.has(key) || !installedPods && key.split(path36.sep).includes("Pods"))
|
|
4357
4622
|
return;
|
|
4358
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
4623
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(path36.dirname(key));
|
|
4359
4624
|
const project = loadProject(key);
|
|
4360
4625
|
projectAt.set(key, project);
|
|
4361
4626
|
projects.push(project);
|
|
@@ -4371,12 +4636,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
4371
4636
|
for (const reference of listed)
|
|
4372
4637
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
4373
4638
|
if (projects.length === 0) {
|
|
4374
|
-
throw new Error(`${
|
|
4639
|
+
throw new Error(`${path36.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
4375
4640
|
}
|
|
4376
|
-
const podfile =
|
|
4377
|
-
if (installedPods && !cocoapods &&
|
|
4641
|
+
const podfile = path36.join(path36.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
4642
|
+
if (installedPods && !cocoapods && fs17.existsSync(podfile))
|
|
4378
4643
|
throw new Error(
|
|
4379
|
-
`${podfile} is not installed into ${
|
|
4644
|
+
`${podfile} is not installed into ${path36.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path36.dirname(podfile)} and open the workspace it writes`
|
|
4380
4645
|
);
|
|
4381
4646
|
return { listed, projects, projectAt, cocoapods };
|
|
4382
4647
|
}
|
|
@@ -4412,7 +4677,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
|
4412
4677
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
|
|
4413
4678
|
}
|
|
4414
4679
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
4415
|
-
const project = loadProject(
|
|
4680
|
+
const project = loadProject(fs17.realpathSync(xcodeproj));
|
|
4416
4681
|
for (const [id, target] of Object.entries(project.objects)) {
|
|
4417
4682
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
4418
4683
|
if (isIosAppTarget({ project, id, target }, { requireSources: false }))
|
|
@@ -4420,30 +4685,30 @@ function defaultXcodeAppTarget(xcodeproj) {
|
|
|
4420
4685
|
}
|
|
4421
4686
|
}
|
|
4422
4687
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
4423
|
-
const container =
|
|
4688
|
+
const container = fs17.realpathSync(xcodeprojOrWorkspace);
|
|
4424
4689
|
const { projects } = workspaceProjects(container);
|
|
4425
4690
|
const containers = [
|
|
4426
4691
|
.../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
|
|
4427
4692
|
];
|
|
4428
4693
|
const found = containers.flatMap(
|
|
4429
4694
|
(dir) => [
|
|
4430
|
-
|
|
4431
|
-
...isDirectory(
|
|
4695
|
+
path36.join(dir, "xcshareddata"),
|
|
4696
|
+
...isDirectory(path36.join(dir, "xcuserdata")) ? fs17.readdirSync(path36.join(dir, "xcuserdata")).sort().map((user) => path36.join(dir, "xcuserdata", user)) : []
|
|
4432
4697
|
].map((data) => ({
|
|
4433
4698
|
dir,
|
|
4434
|
-
file:
|
|
4699
|
+
file: path36.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
4435
4700
|
}))
|
|
4436
|
-
).find((candidate) =>
|
|
4701
|
+
).find((candidate) => fs17.existsSync(candidate.file));
|
|
4437
4702
|
if (!found) {
|
|
4438
4703
|
const known = containers.flatMap(
|
|
4439
|
-
(dir) =>
|
|
4704
|
+
(dir) => fs17.existsSync(path36.join(dir, "xcshareddata", "xcschemes")) ? fs17.readdirSync(path36.join(dir, "xcshareddata", "xcschemes")).filter((name3) => name3.endsWith(".xcscheme")).map((name3) => name3.slice(0, -".xcscheme".length)).sort() : []
|
|
4440
4705
|
);
|
|
4441
4706
|
throw new Error(
|
|
4442
|
-
`${
|
|
4707
|
+
`${path36.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
4443
4708
|
);
|
|
4444
4709
|
}
|
|
4445
4710
|
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
4446
|
-
|
|
4711
|
+
fs17.readFileSync(found.file, "utf8")
|
|
4447
4712
|
);
|
|
4448
4713
|
const attribute = (text2, name3) => {
|
|
4449
4714
|
const value = new RegExp(`\\b${name3}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
|
|
@@ -4456,12 +4721,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
4456
4721
|
if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
|
|
4457
4722
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
4458
4723
|
}
|
|
4459
|
-
const projectPath =
|
|
4460
|
-
|
|
4724
|
+
const projectPath = path36.resolve(
|
|
4725
|
+
path36.dirname(found.dir),
|
|
4461
4726
|
referenced.slice("container:".length)
|
|
4462
4727
|
);
|
|
4463
4728
|
const project = projects.find(
|
|
4464
|
-
(candidate) =>
|
|
4729
|
+
(candidate) => fs17.existsSync(projectPath) && candidate.xcodeproj === fs17.realpathSync(projectPath)
|
|
4465
4730
|
);
|
|
4466
4731
|
const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
|
|
4467
4732
|
const name2 = target && str(target.target.name);
|
|
@@ -4471,26 +4736,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
4471
4736
|
var NativeAppTargetSelectionError = class extends Error {
|
|
4472
4737
|
};
|
|
4473
4738
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
4474
|
-
const nested =
|
|
4475
|
-
const iosRoot =
|
|
4476
|
-
const entries =
|
|
4739
|
+
const nested = path36.join(projectRoot, "ios");
|
|
4740
|
+
const iosRoot = fs17.existsSync(nested) ? nested : projectRoot;
|
|
4741
|
+
const entries = fs17.readdirSync(iosRoot, { withFileTypes: true });
|
|
4477
4742
|
const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
4478
|
-
xcodeproj:
|
|
4743
|
+
xcodeproj: path36.join(iosRoot, entry.name),
|
|
4479
4744
|
workspace: null
|
|
4480
4745
|
})) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
4481
|
-
const workspace =
|
|
4746
|
+
const workspace = path36.join(iosRoot, entry.name);
|
|
4482
4747
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
4483
4748
|
xcodeproj: xcodeproj2,
|
|
4484
4749
|
workspace
|
|
4485
4750
|
}));
|
|
4486
4751
|
}).filter(
|
|
4487
|
-
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(
|
|
4752
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path36.sep).includes("Pods") && fs17.existsSync(xcodeproj2)
|
|
4488
4753
|
).filter(
|
|
4489
4754
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
4490
4755
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
4491
4756
|
xcodeproj: xcodeproj2,
|
|
4492
4757
|
workspace,
|
|
4493
|
-
name:
|
|
4758
|
+
name: path36.basename(xcodeproj2)
|
|
4494
4759
|
}));
|
|
4495
4760
|
if (projects.length === 0) return null;
|
|
4496
4761
|
if (projects.length > 1 && !iosTarget) {
|
|
@@ -4519,13 +4784,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
4519
4784
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
4520
4785
|
if (!iosTarget) {
|
|
4521
4786
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
4522
|
-
const container =
|
|
4787
|
+
const container = fs17.existsSync(workspace) ? workspace : xcodeproj;
|
|
4523
4788
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
4524
|
-
if (
|
|
4789
|
+
if (fs17.existsSync(path36.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
4525
4790
|
return true;
|
|
4526
|
-
const users =
|
|
4527
|
-
return
|
|
4528
|
-
(user) =>
|
|
4791
|
+
const users = path36.join(dir, "xcuserdata");
|
|
4792
|
+
return fs17.existsSync(users) && fs17.readdirSync(users).some(
|
|
4793
|
+
(user) => fs17.existsSync(path36.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
4529
4794
|
);
|
|
4530
4795
|
});
|
|
4531
4796
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -4534,8 +4799,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
4534
4799
|
throw new Error(`native app identity has no application target ${target}`);
|
|
4535
4800
|
return { xcodeproj, target, workspace: project.workspace };
|
|
4536
4801
|
}
|
|
4537
|
-
var workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
4538
|
-
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace :
|
|
4802
|
+
var workspaceResolvedFile = (xcodeprojOrWorkspace) => path36.join(
|
|
4803
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path36.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
4539
4804
|
"xcshareddata",
|
|
4540
4805
|
"swiftpm",
|
|
4541
4806
|
"Package.resolved"
|
|
@@ -4550,7 +4815,7 @@ var SwiftPackageResolutionRequired = class extends Error {
|
|
|
4550
4815
|
}
|
|
4551
4816
|
};
|
|
4552
4817
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
4553
|
-
const xcodeprojOrWorkspace =
|
|
4818
|
+
const xcodeprojOrWorkspace = fs17.realpathSync(input);
|
|
4554
4819
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
4555
4820
|
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
4556
4821
|
xcodeprojOrWorkspace,
|
|
@@ -4559,7 +4824,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4559
4824
|
const allTargets = projects.flatMap(projectTargets);
|
|
4560
4825
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
4561
4826
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
4562
|
-
const container =
|
|
4827
|
+
const container = path36.basename(xcodeprojOrWorkspace);
|
|
4563
4828
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
4564
4829
|
if (named.length !== 1) {
|
|
4565
4830
|
if (appTargets.length === 0)
|
|
@@ -4580,31 +4845,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4580
4845
|
for (const ref of allTargets) {
|
|
4581
4846
|
const product = ref.project.object(str(ref.target.productReference));
|
|
4582
4847
|
const file = str(product?.path);
|
|
4583
|
-
if (file && !byProduct.has(
|
|
4584
|
-
byProduct.set(
|
|
4848
|
+
if (file && !byProduct.has(path36.basename(file)))
|
|
4849
|
+
byProduct.set(path36.basename(file), ref);
|
|
4585
4850
|
}
|
|
4586
4851
|
const proxied = (project, proxyId) => {
|
|
4587
4852
|
const proxy = project.object(proxyId);
|
|
4588
4853
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
4589
4854
|
const portal = str(proxy.containerPortal);
|
|
4590
4855
|
const portalPath = project.resolvePath(portal ?? "");
|
|
4591
|
-
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath &&
|
|
4856
|
+
const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && fs17.existsSync(portalPath) ? projectAt.get(fs17.realpathSync(portalPath)) : void 0;
|
|
4592
4857
|
const remote = str(proxy.remoteGlobalIDString);
|
|
4593
4858
|
if (!owner || !remote) return void 0;
|
|
4594
4859
|
return projectTargets(owner).find(
|
|
4595
4860
|
(ref) => ref.id === remote || str(ref.target.productReference) === remote
|
|
4596
4861
|
);
|
|
4597
4862
|
};
|
|
4598
|
-
const
|
|
4863
|
+
const linkedTargets = (ref) => {
|
|
4599
4864
|
const { project, target } = ref;
|
|
4600
4865
|
const found = [];
|
|
4601
|
-
for (const dependencyId of list(target.dependencies)) {
|
|
4602
|
-
const dependency = project.object(dependencyId);
|
|
4603
|
-
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
|
|
4604
|
-
const direct = str(dependency.target);
|
|
4605
|
-
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
|
|
4606
|
-
if (resolved) found.push(resolved);
|
|
4607
|
-
}
|
|
4608
4866
|
for (const phaseId of list(target.buildPhases)) {
|
|
4609
4867
|
const phase = project.object(phaseId);
|
|
4610
4868
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
@@ -4612,11 +4870,38 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4612
4870
|
const buildFile = project.object(buildFileId);
|
|
4613
4871
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
4614
4872
|
const file = project.object(str(buildFile.fileRef));
|
|
4615
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
4616
|
-
if (resolved)
|
|
4873
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path36.basename(str(file.path) ?? "")) : void 0;
|
|
4874
|
+
if (resolved)
|
|
4875
|
+
found.push({
|
|
4876
|
+
target: resolved,
|
|
4877
|
+
attributes: list(
|
|
4878
|
+
isDict(buildFile.settings) ? buildFile.settings.ATTRIBUTES : void 0
|
|
4879
|
+
)
|
|
4880
|
+
});
|
|
4617
4881
|
}
|
|
4618
4882
|
}
|
|
4619
|
-
return found
|
|
4883
|
+
return found;
|
|
4884
|
+
};
|
|
4885
|
+
const frameworkFlagLinks = (ref, flags) => {
|
|
4886
|
+
const words = settingList(flags);
|
|
4887
|
+
const linked = new Set(linkedTargets(ref).map((link) => link.target));
|
|
4888
|
+
return words.flatMap((word, index) => {
|
|
4889
|
+
const target = words[index - 1] === "-framework" ? byProduct.get(`${word}.framework`) : void 0;
|
|
4890
|
+
if (!target || target === ref || linked.has(target)) return [];
|
|
4891
|
+
linked.add(target);
|
|
4892
|
+
return [{ target, attributes: [] }];
|
|
4893
|
+
});
|
|
4894
|
+
};
|
|
4895
|
+
const dependenciesOf = (ref) => {
|
|
4896
|
+
const { project, target } = ref;
|
|
4897
|
+
const found = list(target.dependencies).flatMap((dependencyId) => {
|
|
4898
|
+
const dependency = project.object(dependencyId);
|
|
4899
|
+
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) return [];
|
|
4900
|
+
const direct = str(dependency.target);
|
|
4901
|
+
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
|
|
4902
|
+
return resolved ? [resolved] : [];
|
|
4903
|
+
});
|
|
4904
|
+
return [...found, ...linkedTargets(ref).map((link) => link.target)].filter(
|
|
4620
4905
|
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
4621
4906
|
);
|
|
4622
4907
|
};
|
|
@@ -4669,8 +4954,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4669
4954
|
ref.project.visitMembers(
|
|
4670
4955
|
ref.id,
|
|
4671
4956
|
ref.project.resolvePath,
|
|
4672
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
4673
|
-
|
|
4957
|
+
(file) => isDirectory(file) ? walkFiles(file) : fs17.existsSync(file) ? [file] : [],
|
|
4958
|
+
path36.join,
|
|
4674
4959
|
(file, kind) => {
|
|
4675
4960
|
if (kind === "header") found.push(file);
|
|
4676
4961
|
}
|
|
@@ -4686,12 +4971,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4686
4971
|
for (const ref of projectTargets(project)) {
|
|
4687
4972
|
const product = productName(ref);
|
|
4688
4973
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
4689
|
-
const name2 =
|
|
4974
|
+
const name2 = path36.basename(file);
|
|
4690
4975
|
if (!entries.has(name2))
|
|
4691
4976
|
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
4692
4977
|
}
|
|
4693
4978
|
for (const file of synchronizedHeaders(ref)) {
|
|
4694
|
-
const name2 =
|
|
4979
|
+
const name2 = path36.basename(file);
|
|
4695
4980
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
4696
4981
|
}
|
|
4697
4982
|
}
|
|
@@ -4701,7 +4986,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4701
4986
|
if (folder === null) continue;
|
|
4702
4987
|
for (const file of walkFiles(folder)) {
|
|
4703
4988
|
if (!HEADER_FILE.test(file)) continue;
|
|
4704
|
-
const name2 =
|
|
4989
|
+
const name2 = path36.basename(file);
|
|
4705
4990
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
4706
4991
|
}
|
|
4707
4992
|
}
|
|
@@ -4709,18 +4994,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4709
4994
|
for (const id of Object.keys(project.objects)) {
|
|
4710
4995
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
4711
4996
|
const file = project.resolvePath(id);
|
|
4712
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
4713
|
-
entries.set(
|
|
4997
|
+
if (file && HEADER_FILE.test(file) && !entries.has(path36.basename(file)))
|
|
4998
|
+
entries.set(path36.basename(file), file);
|
|
4714
4999
|
}
|
|
4715
5000
|
const map = [...entries];
|
|
4716
5001
|
projectHeaderMaps.set(project, map);
|
|
4717
5002
|
return map;
|
|
4718
5003
|
};
|
|
4719
5004
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
4720
|
-
const buildDir = (project) =>
|
|
5005
|
+
const buildDir = (project) => path36.join(project.projectDir, ".build/peach-xcode/Build");
|
|
4721
5006
|
const workspaceBuild = {
|
|
4722
|
-
SYMROOT:
|
|
4723
|
-
OBJROOT:
|
|
5007
|
+
SYMROOT: path36.join(buildDir(app.project), "Products"),
|
|
5008
|
+
OBJROOT: path36.join(buildDir(app.project), "Intermediates.noindex")
|
|
4724
5009
|
};
|
|
4725
5010
|
const moduleTarget = (ref) => {
|
|
4726
5011
|
const name2 = str(ref.target.name) ?? ref.id;
|
|
@@ -4735,15 +5020,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4735
5020
|
TARGET_NAME: name2,
|
|
4736
5021
|
TARGETNAME: "$(TARGET_NAME)",
|
|
4737
5022
|
PROJECT: "$(PROJECT_NAME)",
|
|
4738
|
-
PROJECT_NAME:
|
|
5023
|
+
PROJECT_NAME: path36.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
4739
5024
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
4740
5025
|
SRCROOT: ref.project.projectDir,
|
|
4741
5026
|
SOURCE_ROOT: ref.project.projectDir,
|
|
4742
5027
|
PROJECT_DIR: ref.project.projectDir,
|
|
4743
|
-
SYMROOT:
|
|
5028
|
+
SYMROOT: path36.join(buildDir(ref.project), "Products"),
|
|
4744
5029
|
BUILD_DIR: "$(SYMROOT)",
|
|
4745
5030
|
BUILD_ROOT: "$(SYMROOT)",
|
|
4746
|
-
OBJROOT:
|
|
5031
|
+
OBJROOT: path36.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
4747
5032
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
4748
5033
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
4749
5034
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -4785,7 +5070,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4785
5070
|
xcconfigs
|
|
4786
5071
|
);
|
|
4787
5072
|
const searchRules = recursiveSearchRules(settings2);
|
|
4788
|
-
const absolute = (file) =>
|
|
5073
|
+
const absolute = (file) => path36.resolve(ref.project.projectDir, file);
|
|
4789
5074
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
4790
5075
|
const product = settings2("PRODUCT_NAME");
|
|
4791
5076
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -4816,7 +5101,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4816
5101
|
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
4817
5102
|
);
|
|
4818
5103
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
4819
|
-
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
5104
|
+
const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path36.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
4820
5105
|
if (versioning) {
|
|
4821
5106
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
4822
5107
|
const custom = [
|
|
@@ -4829,22 +5114,22 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4829
5114
|
].filter((key) => settings2(key));
|
|
4830
5115
|
if (custom.length)
|
|
4831
5116
|
throw new Error(
|
|
4832
|
-
`${name2}: Xcode generates ${
|
|
5117
|
+
`${name2}: Xcode generates ${path36.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
4833
5118
|
);
|
|
4834
5119
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
4835
5120
|
const [major, minor] = version.split(".");
|
|
4836
|
-
const
|
|
5121
|
+
const number2 = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
|
|
4837
5122
|
const unit = [
|
|
4838
5123
|
` extern const unsigned char ${symbol}VersionString[];`,
|
|
4839
5124
|
` extern const double ${symbol}VersionNumber;`,
|
|
4840
5125
|
"",
|
|
4841
5126
|
` const unsigned char ${symbol}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings2("PROJECT_NAME")}-${version}" "\\n";`,
|
|
4842
|
-
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${
|
|
5127
|
+
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number2};`,
|
|
4843
5128
|
""
|
|
4844
5129
|
].join("\n");
|
|
4845
|
-
if (!
|
|
4846
|
-
|
|
4847
|
-
|
|
5130
|
+
if (!fs17.existsSync(versioning) || fs17.readFileSync(versioning, "utf8") !== unit) {
|
|
5131
|
+
fs17.mkdirSync(path36.dirname(versioning), { recursive: true });
|
|
5132
|
+
fs17.writeFileSync(versioning, unit);
|
|
4848
5133
|
}
|
|
4849
5134
|
allSources.push(versioning);
|
|
4850
5135
|
}
|
|
@@ -4863,7 +5148,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4863
5148
|
const headerFiles = headerPhase(ref);
|
|
4864
5149
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
4865
5150
|
for (const { file, visibility } of headerFiles) {
|
|
4866
|
-
const name3 =
|
|
5151
|
+
const name3 = path36.basename(file);
|
|
4867
5152
|
const published = visibility !== "Project";
|
|
4868
5153
|
if (!ownHeaders.has(name3))
|
|
4869
5154
|
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
@@ -4871,7 +5156,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4871
5156
|
ownHeaders.set(`${product}/${name3}`, file);
|
|
4872
5157
|
}
|
|
4873
5158
|
for (const file of synchronizedHeaders(ref)) {
|
|
4874
|
-
const name3 =
|
|
5159
|
+
const name3 = path36.basename(file);
|
|
4875
5160
|
if (ownHeaders.has(name3)) continue;
|
|
4876
5161
|
ownHeaders.set(name3, file);
|
|
4877
5162
|
const qualified = `${product}/${name3}`;
|
|
@@ -4883,24 +5168,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4883
5168
|
const otherProduct = productName(other);
|
|
4884
5169
|
for (const { file, visibility } of headerPhase(other)) {
|
|
4885
5170
|
if (visibility === "Project") continue;
|
|
4886
|
-
const key = `${otherProduct}/${
|
|
5171
|
+
const key = `${otherProduct}/${path36.basename(file)}`;
|
|
4887
5172
|
if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
|
|
4888
5173
|
}
|
|
4889
5174
|
}
|
|
4890
|
-
const wrapper =
|
|
5175
|
+
const wrapper = path36.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
4891
5176
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
4892
|
-
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ?
|
|
4893
|
-
const frameworkCompatibility = frameworkUmbrella && moduleMap &&
|
|
5177
|
+
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path36.join(path36.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
|
|
5178
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap && fs17.existsSync(moduleMap) && fs17.existsSync(frameworkUmbrella) ? {
|
|
4894
5179
|
framework: true,
|
|
4895
5180
|
moduleMap,
|
|
4896
5181
|
umbrella: frameworkUmbrella,
|
|
4897
|
-
outputModuleMap:
|
|
4898
|
-
outputUmbrella:
|
|
5182
|
+
outputModuleMap: path36.join(wrapper, "Modules", "module.modulemap"),
|
|
5183
|
+
outputUmbrella: path36.join(
|
|
4899
5184
|
wrapper,
|
|
4900
5185
|
"Headers",
|
|
4901
|
-
|
|
5186
|
+
path36.basename(frameworkUmbrella)
|
|
4902
5187
|
),
|
|
4903
|
-
outputHeader:
|
|
5188
|
+
outputHeader: path36.join(
|
|
4904
5189
|
wrapper,
|
|
4905
5190
|
"Headers",
|
|
4906
5191
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
@@ -4914,10 +5199,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4914
5199
|
outputUmbrella: compatibility.outputUmbrella,
|
|
4915
5200
|
outputHeader: compatibility.outputHeader
|
|
4916
5201
|
} : frameworkCompatibility;
|
|
4917
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap &&
|
|
5202
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path36.relative(path36.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path36.sep)[0] !== ".." && fs17.existsSync(moduleMap) ? fs17.readdirSync(path36.dirname(moduleMap)).flatMap((entry) => {
|
|
4918
5203
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
4919
|
-
const file =
|
|
4920
|
-
return
|
|
5204
|
+
const file = path36.join(path36.dirname(moduleMap), entry);
|
|
5205
|
+
return fs17.existsSync(file) ? [file] : [];
|
|
4921
5206
|
}) : [];
|
|
4922
5207
|
const fileFlags = {};
|
|
4923
5208
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -4941,6 +5226,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4941
5226
|
settings: settings2,
|
|
4942
5227
|
keys,
|
|
4943
5228
|
module: {
|
|
5229
|
+
id: `${ref.project.projectFile}#${ref.id}`,
|
|
4944
5230
|
name: name2,
|
|
4945
5231
|
targetIdentity: JSON.stringify([ref.project.xcodeproj, ref.id]),
|
|
4946
5232
|
targetDependencies: Array(),
|
|
@@ -4989,15 +5275,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4989
5275
|
// xcode searches its products' include directory before
|
|
4990
5276
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
4991
5277
|
headerSearchPaths: [
|
|
4992
|
-
|
|
5278
|
+
path36.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
4993
5279
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
4994
5280
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
4995
5281
|
),
|
|
4996
|
-
|
|
5282
|
+
path36.join(
|
|
4997
5283
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
4998
5284
|
settings2("CURRENT_ARCH")
|
|
4999
5285
|
),
|
|
5000
|
-
|
|
5286
|
+
path36.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
5001
5287
|
settings2("DERIVED_FILE_DIR")
|
|
5002
5288
|
],
|
|
5003
5289
|
userHeaderSearchPaths: settingList(
|
|
@@ -5047,10 +5333,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5047
5333
|
...headerFiles.flatMap(
|
|
5048
5334
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
5049
5335
|
[
|
|
5050
|
-
|
|
5336
|
+
path36.join(
|
|
5051
5337
|
wrapper,
|
|
5052
5338
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
5053
|
-
|
|
5339
|
+
path36.basename(file)
|
|
5054
5340
|
),
|
|
5055
5341
|
file
|
|
5056
5342
|
]
|
|
@@ -5064,7 +5350,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5064
5350
|
return [];
|
|
5065
5351
|
const destination = expand(
|
|
5066
5352
|
str(phase.dstPath) ?? "",
|
|
5067
|
-
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ?
|
|
5353
|
+
(name3) => name3 === "PUBLIC_HEADERS_FOLDER_PATH" ? path36.join(wrapper, "Headers") : name3 === "PRIVATE_HEADERS_FOLDER_PATH" ? path36.join(wrapper, "PrivateHeaders") : settings2(name3)
|
|
5068
5354
|
);
|
|
5069
5355
|
return list(phase.files).flatMap((id) => {
|
|
5070
5356
|
const file = ref.project.resolvePath(
|
|
@@ -5072,17 +5358,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5072
5358
|
);
|
|
5073
5359
|
return file && HEADER_FILE.test(file) ? [
|
|
5074
5360
|
[
|
|
5075
|
-
|
|
5361
|
+
path36.resolve(
|
|
5076
5362
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
5077
5363
|
destination,
|
|
5078
|
-
|
|
5364
|
+
path36.basename(file)
|
|
5079
5365
|
),
|
|
5080
5366
|
file
|
|
5081
5367
|
]
|
|
5082
5368
|
] : [];
|
|
5083
5369
|
});
|
|
5084
5370
|
}),
|
|
5085
|
-
...moduleMap ? [[
|
|
5371
|
+
...moduleMap ? [[path36.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
5086
5372
|
]) : Object.fromEntries([
|
|
5087
5373
|
...podHeaders.map((file) => [file, file]),
|
|
5088
5374
|
...moduleMap ? [[moduleMap, moduleMap]] : []
|
|
@@ -5114,7 +5400,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5114
5400
|
const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module2 }) => ({ ref, framework: module2 }));
|
|
5115
5401
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
5116
5402
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
5117
|
-
({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) =>
|
|
5403
|
+
({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path36.dirname(file)).filter((dir) => fs17.existsSync(dir)) : []
|
|
5118
5404
|
);
|
|
5119
5405
|
const expandValue = (value, settings2) => {
|
|
5120
5406
|
if (typeof value === "string") return expand(value, settings2);
|
|
@@ -5135,7 +5421,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5135
5421
|
const phase = owner.ref.project.object(phaseId);
|
|
5136
5422
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
5137
5423
|
continue;
|
|
5138
|
-
const absolute = (raw) =>
|
|
5424
|
+
const absolute = (raw) => path36.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
5139
5425
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
5140
5426
|
const file = absolute(raw);
|
|
5141
5427
|
xcconfigs.add(file);
|
|
@@ -5151,7 +5437,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5151
5437
|
].filter((file) => file.endsWith(".bundle"));
|
|
5152
5438
|
if (inputs.length !== outputs.length)
|
|
5153
5439
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
5154
|
-
const destinationRoot =
|
|
5440
|
+
const destinationRoot = path36.join(
|
|
5155
5441
|
owner.settings("TARGET_BUILD_DIR"),
|
|
5156
5442
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
5157
5443
|
);
|
|
@@ -5160,24 +5446,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5160
5446
|
const file = str(
|
|
5161
5447
|
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
5162
5448
|
);
|
|
5163
|
-
return file &&
|
|
5449
|
+
return file && path36.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
5164
5450
|
});
|
|
5165
5451
|
if (!product && !isDirectory(input2))
|
|
5166
5452
|
throw new Error(
|
|
5167
5453
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
5168
5454
|
);
|
|
5169
|
-
const destination =
|
|
5170
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
5455
|
+
const destination = path36.relative(destinationRoot, outputs[index]);
|
|
5456
|
+
if (destination === ".." || destination.startsWith(`..${path36.sep}`) || path36.isAbsolute(destination) || path36.basename(input2) !== path36.basename(destination))
|
|
5171
5457
|
throw new Error(
|
|
5172
5458
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
5173
5459
|
);
|
|
5174
|
-
const infoFile = product ?
|
|
5460
|
+
const infoFile = product ? path36.resolve(
|
|
5175
5461
|
product.ref.project.projectDir,
|
|
5176
5462
|
product.settings("INFOPLIST_FILE")
|
|
5177
5463
|
) : null;
|
|
5178
5464
|
if (infoFile) xcconfigs.add(infoFile);
|
|
5179
5465
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
5180
|
-
const bundlePath = prefix + destination.split(
|
|
5466
|
+
const bundlePath = prefix + destination.split(path36.sep).join("/");
|
|
5181
5467
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
5182
5468
|
throw new Error(
|
|
5183
5469
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -5188,21 +5474,30 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5188
5474
|
resources: product.module.resources,
|
|
5189
5475
|
infoPlist: plist2.build(
|
|
5190
5476
|
expandValue(
|
|
5191
|
-
plist2.parse(
|
|
5477
|
+
plist2.parse(fs17.readFileSync(infoFile, "utf8")),
|
|
5192
5478
|
product.settings
|
|
5193
5479
|
)
|
|
5194
5480
|
)
|
|
5195
5481
|
} : {
|
|
5196
|
-
resources:
|
|
5482
|
+
resources: fs17.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path36.join(entry.parentPath, entry.name)).sort(),
|
|
5197
5483
|
sourceRoot: input2
|
|
5198
5484
|
}
|
|
5199
5485
|
});
|
|
5200
5486
|
}
|
|
5201
5487
|
}
|
|
5202
5488
|
}
|
|
5203
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
5489
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? path36.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
5490
|
+
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? path36.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
|
|
5491
|
+
const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
|
|
5492
|
+
plist2.parse(fs17.readFileSync(entitlementsFile, "utf8")),
|
|
5493
|
+
(value) => expand(value, (key) => {
|
|
5494
|
+
const resolved = settings(key);
|
|
5495
|
+
if (!resolved) throw new Error(`missing signing build setting ${key}`);
|
|
5496
|
+
return resolved;
|
|
5497
|
+
})
|
|
5498
|
+
) : void 0;
|
|
5204
5499
|
const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
5205
|
-
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(
|
|
5500
|
+
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(fs17.readFileSync(infoPlistFile, "utf8")) : {};
|
|
5206
5501
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
5207
5502
|
throw new Error(`${module.name} Info.plist must contain a dictionary`);
|
|
5208
5503
|
}
|
|
@@ -5248,7 +5543,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5248
5543
|
};
|
|
5249
5544
|
}
|
|
5250
5545
|
const localPackageDirs = [
|
|
5251
|
-
...listed.filter((reference) =>
|
|
5546
|
+
...listed.filter((reference) => fs17.existsSync(path36.join(reference, "Package.swift"))),
|
|
5252
5547
|
...projects.flatMap(
|
|
5253
5548
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
5254
5549
|
if (!isDict(entry)) return [];
|
|
@@ -5258,19 +5553,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5258
5553
|
const packages = [];
|
|
5259
5554
|
while (pending.length > 0) {
|
|
5260
5555
|
const dir = pending.pop();
|
|
5261
|
-
if (
|
|
5556
|
+
if (fs17.existsSync(path36.join(dir, "Package.swift"))) {
|
|
5262
5557
|
packages.push(dir);
|
|
5263
5558
|
continue;
|
|
5264
5559
|
}
|
|
5265
5560
|
if (!isDirectory(dir)) continue;
|
|
5266
|
-
for (const child of
|
|
5561
|
+
for (const child of fs17.readdirSync(dir, { withFileTypes: true }))
|
|
5267
5562
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
5268
|
-
pending.push(
|
|
5563
|
+
pending.push(path36.join(dir, child.name));
|
|
5269
5564
|
}
|
|
5270
5565
|
return packages;
|
|
5271
5566
|
}
|
|
5272
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
5273
|
-
return candidate &&
|
|
5567
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path36.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
|
|
5568
|
+
return candidate && fs17.existsSync(path36.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
5274
5569
|
})
|
|
5275
5570
|
)
|
|
5276
5571
|
];
|
|
@@ -5300,7 +5595,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5300
5595
|
if ((flag === "-framework" || flag === "-weak_framework") && name2)
|
|
5301
5596
|
sdkFrameworks.add(name2);
|
|
5302
5597
|
});
|
|
5303
|
-
const absolute = (raw) =>
|
|
5598
|
+
const absolute = (raw) => path36.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
5304
5599
|
const requested = options.nativeModules;
|
|
5305
5600
|
const includeBinary = (name2, dir) => {
|
|
5306
5601
|
if (!requested || nativeTargets.has(ref) || requested.includes(name2) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module2) => requested.includes(module2)))
|
|
@@ -5312,14 +5607,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5312
5607
|
for (const directory of expandSearchPath(absolute(raw), searchRules)) {
|
|
5313
5608
|
if (frameworkSearchDirectories.has(directory)) continue;
|
|
5314
5609
|
frameworkSearchDirectories.add(directory);
|
|
5315
|
-
if (!
|
|
5610
|
+
if (!fs17.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
|
|
5316
5611
|
continue;
|
|
5317
|
-
for (const entry of
|
|
5612
|
+
for (const entry of fs17.readdirSync(directory, { withFileTypes: true })) {
|
|
5318
5613
|
const name2 = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
5319
5614
|
if (!name2 || byProduct.has(entry.name) || searchedFrameworks.has(name2))
|
|
5320
5615
|
continue;
|
|
5321
|
-
const file =
|
|
5322
|
-
if (
|
|
5616
|
+
const file = path36.join(directory, entry.name);
|
|
5617
|
+
if (fs17.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
5323
5618
|
searchedFrameworks.set(name2, file);
|
|
5324
5619
|
}
|
|
5325
5620
|
}
|
|
@@ -5327,9 +5622,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5327
5622
|
}
|
|
5328
5623
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
5329
5624
|
const dir = absolute(raw);
|
|
5330
|
-
const modulemap =
|
|
5331
|
-
if (!
|
|
5332
|
-
const name2 = moduleMapName(
|
|
5625
|
+
const modulemap = path36.join(dir, "module.modulemap");
|
|
5626
|
+
if (!fs17.existsSync(modulemap)) continue;
|
|
5627
|
+
const name2 = moduleMapName(fs17.readFileSync(modulemap, "utf8"));
|
|
5333
5628
|
if (name2 && !binaryFrameworks.has(name2)) includeBinary(name2, dir);
|
|
5334
5629
|
}
|
|
5335
5630
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -5338,7 +5633,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5338
5633
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
5339
5634
|
for (const raw of list(phase.inputFileListPaths)) {
|
|
5340
5635
|
const file = absolute(raw);
|
|
5341
|
-
if (!
|
|
5636
|
+
if (!fs17.existsSync(file)) continue;
|
|
5342
5637
|
xcconfigs.add(file);
|
|
5343
5638
|
inputs.push(...fileListEntries(file, absolute));
|
|
5344
5639
|
}
|
|
@@ -5360,6 +5655,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5360
5655
|
productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
|
|
5361
5656
|
return builds ? [ref2] : [];
|
|
5362
5657
|
};
|
|
5658
|
+
const productAttributes = /* @__PURE__ */ new Map();
|
|
5659
|
+
for (const phaseId of list(target.buildPhases)) {
|
|
5660
|
+
const phase = project.object(phaseId);
|
|
5661
|
+
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
5662
|
+
for (const id of list(phase.files)) {
|
|
5663
|
+
const file = project.object(id);
|
|
5664
|
+
const product = str(file?.productRef);
|
|
5665
|
+
if (file && product && xcodeBuildFileBuildsForIos(file))
|
|
5666
|
+
productAttributes.set(
|
|
5667
|
+
product,
|
|
5668
|
+
list(isDict(file.settings) ? file.settings.ATTRIBUTES : void 0)
|
|
5669
|
+
);
|
|
5670
|
+
}
|
|
5671
|
+
}
|
|
5363
5672
|
const referencedProducts = [
|
|
5364
5673
|
...list(target.dependencies).flatMap(productRef),
|
|
5365
5674
|
...list(target.buildPhases).flatMap((id) => {
|
|
@@ -5368,6 +5677,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5368
5677
|
})
|
|
5369
5678
|
];
|
|
5370
5679
|
const productDependencies = [
|
|
5680
|
+
...productAttributes.keys(),
|
|
5371
5681
|
...list(target.packageProductDependencies).filter(
|
|
5372
5682
|
(id) => productPlatforms.get(id) !== false
|
|
5373
5683
|
),
|
|
@@ -5385,9 +5695,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5385
5695
|
const reference = project.object(str(dependency.package));
|
|
5386
5696
|
const linked = {
|
|
5387
5697
|
product,
|
|
5698
|
+
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
5388
5699
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
5389
5700
|
kind: "local",
|
|
5390
|
-
dir:
|
|
5701
|
+
dir: path36.resolve(
|
|
5391
5702
|
project.projectDir,
|
|
5392
5703
|
str(reference.relativePath) ?? ""
|
|
5393
5704
|
)
|
|
@@ -5421,10 +5732,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5421
5732
|
continue;
|
|
5422
5733
|
}
|
|
5423
5734
|
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
5424
|
-
byProduct.has(
|
|
5735
|
+
byProduct.has(path36.basename(rawPath)))
|
|
5425
5736
|
continue;
|
|
5426
5737
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
5427
|
-
if (fileId && resolved !== null && !
|
|
5738
|
+
if (fileId && resolved !== null && !fs17.existsSync(resolved))
|
|
5428
5739
|
throw new Error(
|
|
5429
5740
|
`${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
5430
5741
|
);
|
|
@@ -5447,7 +5758,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5447
5758
|
({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
|
|
5448
5759
|
);
|
|
5449
5760
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
5450
|
-
let packageResolved =
|
|
5761
|
+
let packageResolved = fs17.existsSync(resolvedFile) ? [fs17.realpathSync(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path36.join(dir, "Package.resolved")))].filter((file) => fs17.existsSync(file)).map((file) => fs17.realpathSync(file)).sort();
|
|
5451
5762
|
if (packageResolved.length === 0) {
|
|
5452
5763
|
const requirements = remotePackageRequirements(projects);
|
|
5453
5764
|
if (requirements.length > 0) {
|
|
@@ -5458,6 +5769,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5458
5769
|
const used = order.map((ref) => ref.project);
|
|
5459
5770
|
return {
|
|
5460
5771
|
...module,
|
|
5772
|
+
sourceLinkGraph: {
|
|
5773
|
+
entry: module.id,
|
|
5774
|
+
targets: builtTargets.filter(
|
|
5775
|
+
({ ref }) => ref === app || MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")
|
|
5776
|
+
).map(({ ref, module: module2, settings: settings2 }) => ({
|
|
5777
|
+
id: module2.id,
|
|
5778
|
+
sourceTarget: module2.allSources.length > 0 ? module2.moduleName : null,
|
|
5779
|
+
productName: settings2("FULL_PRODUCT_NAME") || str(ref.project.object(str(ref.target.productReference))?.path) || settings2("PRODUCT_NAME"),
|
|
5780
|
+
productType: str(ref.target.productType),
|
|
5781
|
+
installName: settings2("LD_DYLIB_INSTALL_NAME") || null,
|
|
5782
|
+
buildVersion: {
|
|
5783
|
+
platform: settings2("PLATFORM_NAME") || null,
|
|
5784
|
+
minimumOS: settings2("IPHONEOS_DEPLOYMENT_TARGET") || null,
|
|
5785
|
+
sdk: settings2("SDK_VERSION") || null
|
|
5786
|
+
},
|
|
5787
|
+
machOType: settings2("MACH_O_TYPE") || null,
|
|
5788
|
+
linkerFlags: settingList(settings2("OTHER_LDFLAGS")),
|
|
5789
|
+
dependencies: linkedTargets(ref).concat(frameworkFlagLinks(ref, settings2("OTHER_LDFLAGS"))).filter(
|
|
5790
|
+
(dependency) => MODULE_PRODUCTS.has(str(dependency.target.target.productType) ?? "")
|
|
5791
|
+
).map(({ target, attributes }) => ({
|
|
5792
|
+
target: `${target.project.projectFile}#${target.id}`,
|
|
5793
|
+
attributes
|
|
5794
|
+
}))
|
|
5795
|
+
}))
|
|
5796
|
+
},
|
|
5461
5797
|
moduleMapSources: Object.fromEntries(
|
|
5462
5798
|
builtTargets.flatMap(({ module: module2 }) => {
|
|
5463
5799
|
const compatibility = module2.swift?.compatibility;
|
|
@@ -5473,19 +5809,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5473
5809
|
} : {},
|
|
5474
5810
|
rootDir: commonAncestor(
|
|
5475
5811
|
[
|
|
5476
|
-
workspace ?
|
|
5812
|
+
workspace ? path36.dirname(workspace) : app.project.projectDir,
|
|
5477
5813
|
...used.map((project) => project.projectDir),
|
|
5478
5814
|
...localPackageDirs,
|
|
5479
5815
|
...linkedProducts.flatMap(
|
|
5480
|
-
({ source }) => source.kind === "local" &&
|
|
5816
|
+
({ source }) => source.kind === "local" && fs17.existsSync(source.dir) ? [source.dir] : []
|
|
5481
5817
|
),
|
|
5482
5818
|
...new Set(podSourceDirs)
|
|
5483
|
-
].map((dir) =>
|
|
5819
|
+
].map((dir) => fs17.realpathSync(dir))
|
|
5484
5820
|
),
|
|
5485
5821
|
projectFiles: [
|
|
5486
5822
|
.../* @__PURE__ */ new Set([
|
|
5487
5823
|
...used.map((project) => project.projectFile),
|
|
5488
5824
|
...xcconfigs,
|
|
5825
|
+
...entitlementsFile ? [entitlementsFile] : [],
|
|
5489
5826
|
...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
|
|
5490
5827
|
])
|
|
5491
5828
|
].sort(),
|
|
@@ -5493,13 +5830,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5493
5830
|
appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
|
|
5494
5831
|
infoPlist: infoPlistPending ? null : plist2.build(info),
|
|
5495
5832
|
infoPlistFile,
|
|
5833
|
+
...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
|
|
5496
5834
|
postBundleScripts,
|
|
5497
5835
|
developmentRegion: str(app.project.project.developmentRegion) ?? "en",
|
|
5498
5836
|
frameworks,
|
|
5499
5837
|
resourceProducts,
|
|
5500
5838
|
linkedProducts,
|
|
5501
5839
|
localPackageDirs: [
|
|
5502
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
5840
|
+
...new Set(localPackageDirs.map((dir) => fs17.realpathSync(dir)))
|
|
5503
5841
|
].sort(),
|
|
5504
5842
|
binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
5505
5843
|
sdkFrameworks: [...sdkFrameworks].filter(
|
|
@@ -5578,14 +5916,14 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5578
5916
|
const querySchemes = dictionary.LSApplicationQueriesSchemes;
|
|
5579
5917
|
const urlQuerySchemes = Array.isArray(querySchemes) ? querySchemes : [];
|
|
5580
5918
|
const intentIds = dictionary.OneAppIntentIdentifiers;
|
|
5581
|
-
const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((
|
|
5919
|
+
const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v5) => typeof v5 === "string") ? intentIds : [];
|
|
5582
5920
|
const backgroundIds = dictionary.BGTaskSchedulerPermittedIdentifiers;
|
|
5583
|
-
const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((
|
|
5921
|
+
const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v5) => typeof v5 === "string") ? backgroundIds : [];
|
|
5584
5922
|
const declaredModes = dictionary.UIBackgroundModes;
|
|
5585
|
-
const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((
|
|
5586
|
-
const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((
|
|
5923
|
+
const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((v5) => typeof v5 === "string") ? declaredModes : [];
|
|
5924
|
+
const supportedInterfaceOrientations = Array.isArray(dictionary.UISupportedInterfaceOrientations) && dictionary.UISupportedInterfaceOrientations.every((v5) => typeof v5 === "string") ? dictionary.UISupportedInterfaceOrientations : [];
|
|
5587
5925
|
const ipadSupportedInterfaceOrientations = Array.isArray(dictionary["UISupportedInterfaceOrientations~ipad"]) && dictionary["UISupportedInterfaceOrientations~ipad"].every(
|
|
5588
|
-
(
|
|
5926
|
+
(v5) => typeof v5 === "string"
|
|
5589
5927
|
) ? dictionary["UISupportedInterfaceOrientations~ipad"] : [];
|
|
5590
5928
|
const defaultScreenOrientationMask = nonEmptyString2(
|
|
5591
5929
|
dictionary.EXDefaultScreenOrientationMask
|
|
@@ -5594,9 +5932,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5594
5932
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
|
|
5595
5933
|
const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
|
|
5596
5934
|
const rootModuleName = readRootModuleName(
|
|
5597
|
-
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) &&
|
|
5935
|
+
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && fs18.existsSync(file)).map((file) => fs18.readFileSync(file, "utf8"))
|
|
5598
5936
|
);
|
|
5599
5937
|
return stampNativeBuildSdk({
|
|
5938
|
+
...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
|
|
5600
5939
|
applicationName,
|
|
5601
5940
|
...applicationDisplayName ? { applicationDisplayName } : {},
|
|
5602
5941
|
...rootModuleName ? { rootModuleName } : {},
|
|
@@ -5615,7 +5954,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5615
5954
|
googleSignIn: readGoogleSignInConfiguration(
|
|
5616
5955
|
dictionary,
|
|
5617
5956
|
Object.fromEntries(
|
|
5618
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(
|
|
5957
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(fs18.readFileSync(file, "utf8"))])
|
|
5619
5958
|
)
|
|
5620
5959
|
),
|
|
5621
5960
|
supportedInterfaceOrientations,
|
|
@@ -5624,11 +5963,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5624
5963
|
alternateIconNames: [...alternateIconNames],
|
|
5625
5964
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
5626
5965
|
app.resources,
|
|
5627
|
-
(file) =>
|
|
5966
|
+
(file) => fs18.readFileSync(file, "utf8"),
|
|
5628
5967
|
(file) => {
|
|
5629
|
-
const extension =
|
|
5968
|
+
const extension = path37.extname(file).toLowerCase();
|
|
5630
5969
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
5631
|
-
return `data:${contentType};base64,${
|
|
5970
|
+
return `data:${contentType};base64,${fs18.readFileSync(file).toString("base64")}`;
|
|
5632
5971
|
},
|
|
5633
5972
|
icons,
|
|
5634
5973
|
app.appIconName,
|
|
@@ -5657,23 +5996,29 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
5657
5996
|
const read = selectNativeAppIdentityReader(platform, {
|
|
5658
5997
|
android: () => null,
|
|
5659
5998
|
ios: () => {
|
|
5660
|
-
const nested =
|
|
5661
|
-
const iosRoot =
|
|
5999
|
+
const nested = path37.join(projectRoot, "ios");
|
|
6000
|
+
const iosRoot = fs18.existsSync(nested) ? nested : projectRoot;
|
|
5662
6001
|
const prefix = iosRoot === nested ? "ios/" : "";
|
|
5663
6002
|
const files = {};
|
|
5664
|
-
for (const entry of
|
|
6003
|
+
for (const entry of fs18.readdirSync(iosRoot, { withFileTypes: true })) {
|
|
5665
6004
|
if (entry.name === "Pods") continue;
|
|
5666
6005
|
if (entry.isDirectory()) {
|
|
5667
|
-
const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
|
|
6006
|
+
const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
|
|
6007
|
+
"Info.plist",
|
|
6008
|
+
"AppDelegate.swift",
|
|
6009
|
+
"AppDelegate.mm",
|
|
6010
|
+
"AppDelegate.m",
|
|
6011
|
+
...fs18.readdirSync(path37.join(iosRoot, entry.name)).filter((name2) => name2.endsWith(".entitlements"))
|
|
6012
|
+
];
|
|
5668
6013
|
for (const name2 of names) {
|
|
5669
6014
|
const relative2 = `${prefix}${entry.name}/${name2}`;
|
|
5670
|
-
const file =
|
|
5671
|
-
if (
|
|
6015
|
+
const file = path37.join(projectRoot, relative2);
|
|
6016
|
+
if (fs18.existsSync(file)) files[relative2] = fs18.readFileSync(file, "utf8");
|
|
5672
6017
|
}
|
|
5673
|
-
} else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
|
|
6018
|
+
} else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
|
|
5674
6019
|
const relative2 = `${prefix}${entry.name}`;
|
|
5675
|
-
const file =
|
|
5676
|
-
if (
|
|
6020
|
+
const file = path37.join(projectRoot, relative2);
|
|
6021
|
+
if (fs18.existsSync(file)) files[relative2] = fs18.readFileSync(file, "utf8");
|
|
5677
6022
|
}
|
|
5678
6023
|
}
|
|
5679
6024
|
const identity = extractNativeAppIdentityFromFiles(
|
|
@@ -5690,41 +6035,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
5690
6035
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
5691
6036
|
const files = {};
|
|
5692
6037
|
if (androidMergedManifest) {
|
|
5693
|
-
const file =
|
|
5694
|
-
if (!
|
|
5695
|
-
files[androidMergedManifest] =
|
|
6038
|
+
const file = path37.resolve(projectRoot, androidMergedManifest);
|
|
6039
|
+
if (!fs18.existsSync(file)) return null;
|
|
6040
|
+
files[androidMergedManifest] = fs18.readFileSync(file, "utf8");
|
|
5696
6041
|
} else {
|
|
5697
|
-
const androidRoot =
|
|
5698
|
-
if (!
|
|
6042
|
+
const androidRoot = path37.join(projectRoot, "android");
|
|
6043
|
+
if (!fs18.existsSync(androidRoot)) return null;
|
|
5699
6044
|
const collect = (directory) => {
|
|
5700
|
-
for (const entry of
|
|
5701
|
-
const file =
|
|
6045
|
+
for (const entry of fs18.readdirSync(directory, { withFileTypes: true })) {
|
|
6046
|
+
const file = path37.join(directory, entry.name);
|
|
5702
6047
|
if (entry.isDirectory()) collect(file);
|
|
5703
6048
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
5704
|
-
files[
|
|
6049
|
+
files[path37.relative(projectRoot, file).split(path37.sep).join("/")] = fs18.readFileSync(file, "utf8");
|
|
5705
6050
|
}
|
|
5706
6051
|
};
|
|
5707
|
-
for (const module of
|
|
6052
|
+
for (const module of fs18.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
5708
6053
|
if (!module.isDirectory()) continue;
|
|
5709
|
-
const outputs =
|
|
6054
|
+
const outputs = path37.join(
|
|
5710
6055
|
androidRoot,
|
|
5711
6056
|
module.name,
|
|
5712
6057
|
"build/intermediates/merged_manifests"
|
|
5713
6058
|
);
|
|
5714
|
-
if (
|
|
6059
|
+
if (fs18.existsSync(outputs)) collect(outputs);
|
|
5715
6060
|
}
|
|
5716
6061
|
}
|
|
5717
6062
|
for (const manifest of Object.keys(files)) {
|
|
5718
6063
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
5719
6064
|
if (!resourceDirectory) continue;
|
|
5720
|
-
const absolute =
|
|
5721
|
-
if (!
|
|
5722
|
-
for (const entry of
|
|
6065
|
+
const absolute = path37.resolve(projectRoot, resourceDirectory);
|
|
6066
|
+
if (!fs18.existsSync(absolute)) continue;
|
|
6067
|
+
for (const entry of fs18.readdirSync(absolute, { withFileTypes: true })) {
|
|
5723
6068
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
5724
|
-
for (const resource of
|
|
6069
|
+
for (const resource of fs18.readdirSync(path37.join(absolute, entry.name))) {
|
|
5725
6070
|
if (!resource.endsWith(".xml")) continue;
|
|
5726
6071
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
5727
|
-
files[file] =
|
|
6072
|
+
files[file] = fs18.readFileSync(path37.resolve(projectRoot, file), "utf8");
|
|
5728
6073
|
}
|
|
5729
6074
|
}
|
|
5730
6075
|
}
|
|
@@ -5741,7 +6086,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5741
6086
|
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
5742
6087
|
if (!app) return null;
|
|
5743
6088
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
5744
|
-
const projectManifestPath =
|
|
6089
|
+
const projectManifestPath = path37.join(projectRoot, "package.json");
|
|
5745
6090
|
const projectRequire = createRequire(projectManifestPath);
|
|
5746
6091
|
let reanimatedManifestPath;
|
|
5747
6092
|
try {
|
|
@@ -5755,22 +6100,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5755
6100
|
throw error;
|
|
5756
6101
|
}
|
|
5757
6102
|
const installedManifest = JSON.parse(
|
|
5758
|
-
|
|
6103
|
+
fs18.readFileSync(reanimatedManifestPath, "utf8")
|
|
5759
6104
|
);
|
|
5760
6105
|
const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
5761
6106
|
if (!installedVersion) throw new Error("Reanimated package version is malformed");
|
|
5762
6107
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
5763
6108
|
const defaults = JSON.parse(
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
6109
|
+
fs18.readFileSync(
|
|
6110
|
+
path37.join(
|
|
6111
|
+
path37.dirname(reanimatedManifestPath),
|
|
5767
6112
|
"src/featureFlags/staticFlags.json"
|
|
5768
6113
|
),
|
|
5769
6114
|
"utf8"
|
|
5770
6115
|
)
|
|
5771
6116
|
);
|
|
5772
6117
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
5773
|
-
const manifest = JSON.parse(
|
|
6118
|
+
const manifest = JSON.parse(fs18.readFileSync(projectManifestPath, "utf8"));
|
|
5774
6119
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
5775
6120
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
5776
6121
|
if (overrides !== void 0 && !isRecord(overrides)) {
|