peachsim 0.1.1880 → 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 +8980 -4279
- 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 +8500 -3912
- 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 +9744 -5071
- 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 +723 -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 +30639 -25833
- package/dist-lib/swift-compile.cjs +6823 -2525
- package/dist-lib/swift-compile.mjs +6809 -2509
- 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 +8704 -4124
- 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 +534 -136
- 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/turbo-source.ts +4 -1
- 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,26 +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 {
|
|
2963
|
+
copyFileSync,
|
|
2916
2964
|
cpSync,
|
|
2917
2965
|
existsSync as existsSync7,
|
|
2918
|
-
|
|
2966
|
+
lstatSync,
|
|
2967
|
+
mkdirSync as mkdirSync6,
|
|
2919
2968
|
mkdtempSync as mkdtempSync3,
|
|
2920
|
-
readFileSync as
|
|
2969
|
+
readFileSync as readFileSync20,
|
|
2921
2970
|
readdirSync as readdirSync10,
|
|
2922
|
-
|
|
2971
|
+
readlinkSync,
|
|
2972
|
+
realpathSync as realpathSync5,
|
|
2923
2973
|
renameSync as renameSync2,
|
|
2924
|
-
rmSync as
|
|
2974
|
+
rmSync as rmSync6,
|
|
2925
2975
|
statSync as statSync3,
|
|
2926
2976
|
symlinkSync as symlinkSync2,
|
|
2927
2977
|
utimesSync,
|
|
2928
|
-
writeFileSync as
|
|
2978
|
+
writeFileSync as writeFileSync8
|
|
2929
2979
|
} from "node:fs";
|
|
2930
2980
|
import os6 from "node:os";
|
|
2931
|
-
import
|
|
2981
|
+
import path30 from "node:path";
|
|
2932
2982
|
|
|
2933
2983
|
// src/admitted-mac-build.ts
|
|
2934
2984
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
@@ -2977,78 +3027,142 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
2977
3027
|
// src/swift-foundation.ts
|
|
2978
3028
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2979
3029
|
|
|
2980
|
-
// src/swift-
|
|
3030
|
+
// src/swift-guest-compile.ts
|
|
2981
3031
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2982
|
-
import {
|
|
2983
|
-
import {
|
|
2984
|
-
import
|
|
2985
|
-
import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
|
|
2986
|
-
import os3 from "node:os";
|
|
2987
|
-
import path16 from "node:path";
|
|
2988
|
-
import { promisify as promisify2 } from "node:util";
|
|
2989
|
-
import { brotliCompress, constants as zlibConstants, gunzip, gzip } from "node:zlib";
|
|
2990
|
-
var run = promisify2(execFile2);
|
|
2991
|
-
var deflate = promisify2(gzip);
|
|
2992
|
-
var compressBrotli = promisify2(brotliCompress);
|
|
2993
|
-
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";
|
|
2994
3035
|
|
|
2995
|
-
// src/swift-
|
|
3036
|
+
// src/swift-guest-archive.ts
|
|
2996
3037
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
2997
|
-
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";
|
|
2998
3041
|
import path17 from "node:path";
|
|
2999
3042
|
|
|
3000
|
-
// src/swift-
|
|
3001
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3002
|
-
|
|
3003
|
-
// src/swift-project-user.ts
|
|
3043
|
+
// src/swift-wasm-prune.ts
|
|
3004
3044
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3005
3045
|
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
3006
|
-
import {
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
readFileSync as readFileSync12,
|
|
3012
|
-
realpathSync,
|
|
3013
|
-
rmSync as rmSync3,
|
|
3014
|
-
statSync as statSync2
|
|
3015
|
-
} from "node:fs";
|
|
3016
|
-
import path18 from "node:path";
|
|
3017
|
-
|
|
3018
|
-
// src/swift-reproducible.ts
|
|
3019
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3020
|
-
import { realpathSync as realpathSync2 } from "node:fs";
|
|
3021
|
-
import os4 from "node:os";
|
|
3022
|
-
|
|
3023
|
-
// src/swift-root-lock.ts
|
|
3024
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3025
|
-
import {
|
|
3026
|
-
spawn as spawn4
|
|
3027
|
-
} from "node:child_process";
|
|
3028
|
-
import { createHash as createHash10, randomUUID as randomUUID4 } from "node:crypto";
|
|
3029
|
-
import {
|
|
3030
|
-
linkSync,
|
|
3031
|
-
mkdirSync as mkdirSync2,
|
|
3032
|
-
readdirSync as readdirSync9,
|
|
3033
|
-
readFileSync as readFileSync13,
|
|
3034
|
-
rmSync as rmSync4,
|
|
3035
|
-
writeFileSync as writeFileSync3
|
|
3036
|
-
} from "node:fs";
|
|
3037
|
-
import { homedir as homedir2 } from "node:os";
|
|
3038
|
-
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";
|
|
3039
3051
|
|
|
3040
|
-
// src/
|
|
3052
|
+
// src/swiftRuntimeProductContract.ts
|
|
3041
3053
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3042
|
-
import
|
|
3043
|
-
|
|
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
|
+
});
|
|
3044
3164
|
|
|
3045
3165
|
// src/swift-wasm-prune.ts
|
|
3046
|
-
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3047
|
-
import { execFileSync as execFileSync7 } from "node:child_process";
|
|
3048
|
-
import { createHash as createHash11 } from "node:crypto";
|
|
3049
|
-
import fs11 from "node:fs";
|
|
3050
|
-
import os5 from "node:os";
|
|
3051
|
-
import path21 from "node:path";
|
|
3052
3166
|
var PRUNED_SDK_ARCHIVES = /* @__PURE__ */ new Set([
|
|
3053
3167
|
"libFoundation",
|
|
3054
3168
|
"lib_FoundationCollections",
|
|
@@ -3068,12 +3182,83 @@ var OMIT_SDK_LIB_FLAGS = /* @__PURE__ */ new Set([
|
|
|
3068
3182
|
"-lswift_Concurrency"
|
|
3069
3183
|
]);
|
|
3070
3184
|
|
|
3071
|
-
// 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
|
|
3072
3193
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3073
3194
|
|
|
3074
|
-
// 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
|
|
3075
3253
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3076
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";
|
|
3077
3262
|
import { BinaryNotFoundError, BINARYEN_VERSION, wasmOpt } from "wasm-opt";
|
|
3078
3263
|
var FEATURES = [
|
|
3079
3264
|
"threads",
|
|
@@ -3089,15 +3274,83 @@ var FEATURES = [
|
|
|
3089
3274
|
];
|
|
3090
3275
|
var WASM_OPTIMIZE_IDENTITY = `wasm-opt ${BINARYEN_VERSION} -Oz ${FEATURES.join(",")}`;
|
|
3091
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
|
+
|
|
3092
3345
|
// src/write-build-file.ts
|
|
3093
3346
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3094
|
-
import { existsSync as existsSync6, mkdirSync as
|
|
3095
|
-
import
|
|
3347
|
+
import { existsSync as existsSync6, mkdirSync as mkdirSync5, readFileSync as readFileSync19, writeFileSync as writeFileSync7 } from "node:fs";
|
|
3348
|
+
import path28 from "node:path";
|
|
3096
3349
|
|
|
3097
3350
|
// src/xcode-header-search.ts
|
|
3098
3351
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3099
|
-
import
|
|
3100
|
-
import
|
|
3352
|
+
import fs13 from "node:fs";
|
|
3353
|
+
import path29 from "node:path";
|
|
3101
3354
|
|
|
3102
3355
|
// src/swift-compile.ts
|
|
3103
3356
|
var admittedCores = Number(process.env.TM_EXEC_CPU_CORES);
|
|
@@ -3179,7 +3432,7 @@ var FOUNDATION_IMPLICIT_MODULES = [
|
|
|
3179
3432
|
var FOUNDATION_IMPLICIT_FLAGS = FOUNDATION_IMPLICIT_MODULES.map(
|
|
3180
3433
|
(module) => `, "-Xfrontend", "-import-module", "-Xfrontend", "${module}"`
|
|
3181
3434
|
).join("");
|
|
3182
|
-
var compilerSourceDigest = true ? "
|
|
3435
|
+
var compilerSourceDigest = true ? "a3a3606aced607c5458fcb143386bc40e87f886a19f283b511374ac04ba02293" : swiftCompilerSourceDigest(import.meta.dirname);
|
|
3183
3436
|
var CORE_FOUNDATION_HANDLE_IMPORTS = [
|
|
3184
3437
|
"CFAllocator",
|
|
3185
3438
|
"CFArray",
|
|
@@ -3209,32 +3462,32 @@ init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
|
3209
3462
|
|
|
3210
3463
|
// src/answeredNativePackages.ts
|
|
3211
3464
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3212
|
-
import { readFileSync as
|
|
3465
|
+
import { readFileSync as readFileSync21 } from "node:fs";
|
|
3213
3466
|
import { join as join7 } from "node:path";
|
|
3214
3467
|
|
|
3215
3468
|
// src/runtime-assets.ts
|
|
3216
3469
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3217
|
-
import
|
|
3218
|
-
import
|
|
3470
|
+
import fs14 from "fs";
|
|
3471
|
+
import path31 from "path";
|
|
3219
3472
|
import { fileURLToPath as fileURLToPath3 } from "url";
|
|
3220
3473
|
|
|
3221
3474
|
// src/nitroAdapterContract.ts
|
|
3222
3475
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3223
|
-
import { createHash as
|
|
3224
|
-
import { readdirSync as readdirSync11, readFileSync as
|
|
3225
|
-
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";
|
|
3226
3479
|
|
|
3227
3480
|
// src/swiftNativePinContract.ts
|
|
3228
3481
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3229
3482
|
|
|
3230
3483
|
// src/swift-package-manifest.ts
|
|
3231
|
-
var cacheDir3 =
|
|
3484
|
+
var cacheDir3 = path34.join(cacheDir(), "swift-manifests");
|
|
3232
3485
|
var execFileAsync = promisify3(execFile3);
|
|
3233
3486
|
|
|
3234
3487
|
// src/xcode-json-project.ts
|
|
3235
3488
|
init_define_SWIFT_COVERAGE_SOURCE_DIGESTS();
|
|
3236
3489
|
var import_json5 = __toESM(require_lib(), 1);
|
|
3237
|
-
import
|
|
3490
|
+
import path35 from "node:path";
|
|
3238
3491
|
var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3239
3492
|
var text = (value) => typeof value === "string" ? value : void 0;
|
|
3240
3493
|
var items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -3291,7 +3544,7 @@ var PHASE_ISA = {
|
|
|
3291
3544
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
3292
3545
|
const json = import_json5.default.parse(source);
|
|
3293
3546
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
3294
|
-
const projectDir =
|
|
3547
|
+
const projectDir = path35.dirname(xcodeproj);
|
|
3295
3548
|
const objects = {};
|
|
3296
3549
|
let next = 0;
|
|
3297
3550
|
const add = (entry, id) => {
|
|
@@ -3304,7 +3557,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3304
3557
|
const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
|
|
3305
3558
|
if (base) {
|
|
3306
3559
|
if (base[1] === "PROJECT")
|
|
3307
|
-
return { sourceTree: "<absolute>", path:
|
|
3560
|
+
return { sourceTree: "<absolute>", path: path35.join(projectDir, base[2]) };
|
|
3308
3561
|
if (base[1] === "PRODUCTS")
|
|
3309
3562
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
|
|
3310
3563
|
return null;
|
|
@@ -3312,7 +3565,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3312
3565
|
const unescaped = raw.replaceAll("\\<", "<");
|
|
3313
3566
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
3314
3567
|
if (unescaped.startsWith("~")) return null;
|
|
3315
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
3568
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: path35.join(groupDir, unescaped) };
|
|
3316
3569
|
};
|
|
3317
3570
|
const memberships = [];
|
|
3318
3571
|
const folders = [];
|
|
@@ -3323,7 +3576,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3323
3576
|
const kind = text(entry.kind) ?? "file-reference";
|
|
3324
3577
|
const raw = text(entry.path) ?? "";
|
|
3325
3578
|
const located = raw === "" ? null : locate(raw, parent.dir);
|
|
3326
|
-
const name2 = text(entry.name) ??
|
|
3579
|
+
const name2 = text(entry.name) ?? path35.basename(raw);
|
|
3327
3580
|
const node = { id: "", name: name2, dir: null, parent, children: [] };
|
|
3328
3581
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
3329
3582
|
node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -3444,7 +3697,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
3444
3697
|
if (!isObject(entry)) continue;
|
|
3445
3698
|
const repository = text(entry.repository);
|
|
3446
3699
|
const local = text(entry.path);
|
|
3447
|
-
const name2 = local !== void 0 ?
|
|
3700
|
+
const name2 = local !== void 0 ? path35.basename(path35.resolve(path35.dirname(xcodeproj), local)) : path35.basename(repository ?? "").replace(/\.git$/, "");
|
|
3448
3701
|
const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
3449
3702
|
isa: "XCRemoteSwiftPackageReference",
|
|
3450
3703
|
repositoryURL: repository ?? "",
|
|
@@ -3637,6 +3890,16 @@ var PRE_CXX20_STANDARDS = /* @__PURE__ */ new Set([
|
|
|
3637
3890
|
]);
|
|
3638
3891
|
var APPLICATION = "com.apple.product-type.application";
|
|
3639
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
|
+
};
|
|
3640
3903
|
var FRAMEWORK_PRODUCTS = /* @__PURE__ */ new Set([
|
|
3641
3904
|
"com.apple.product-type.framework",
|
|
3642
3905
|
"com.apple.product-type.framework.static"
|
|
@@ -3654,28 +3917,28 @@ var CONDITIONS = {
|
|
|
3654
3917
|
variant: "normal"
|
|
3655
3918
|
};
|
|
3656
3919
|
function walkFiles(dir) {
|
|
3657
|
-
if (!
|
|
3920
|
+
if (!fs17.existsSync(dir)) return [];
|
|
3658
3921
|
const out = [];
|
|
3659
|
-
for (const entry of
|
|
3922
|
+
for (const entry of fs17.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
3660
3923
|
if (entry.name.startsWith(".")) continue;
|
|
3661
|
-
const full =
|
|
3924
|
+
const full = path36.join(dir, entry.name);
|
|
3662
3925
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
3663
3926
|
else if (entry.isFile()) out.push(full);
|
|
3664
3927
|
}
|
|
3665
3928
|
return out;
|
|
3666
3929
|
}
|
|
3667
|
-
var isDirectory = (dir) =>
|
|
3930
|
+
var isDirectory = (dir) => fs17.existsSync(dir) && fs17.statSync(dir).isDirectory();
|
|
3668
3931
|
function readXcconfig(file, read) {
|
|
3669
|
-
if (read.includes(file) || !
|
|
3932
|
+
if (read.includes(file) || !fs17.existsSync(file)) return {};
|
|
3670
3933
|
read.push(file);
|
|
3671
3934
|
const settings = {};
|
|
3672
|
-
for (const raw of
|
|
3935
|
+
for (const raw of fs17.readFileSync(file, "utf8").split("\n")) {
|
|
3673
3936
|
const line = raw.replace(/\/\/.*$/, "").trim();
|
|
3674
3937
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
3675
3938
|
if (include) {
|
|
3676
3939
|
Object.assign(
|
|
3677
3940
|
settings,
|
|
3678
|
-
readXcconfig(
|
|
3941
|
+
readXcconfig(path36.resolve(path36.dirname(file), include[1]), read)
|
|
3679
3942
|
);
|
|
3680
3943
|
continue;
|
|
3681
3944
|
}
|
|
@@ -3725,22 +3988,22 @@ function decodeXml(text2) {
|
|
|
3725
3988
|
return text2.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
3726
3989
|
}
|
|
3727
3990
|
function workspaceReferences(workspace) {
|
|
3728
|
-
const data =
|
|
3729
|
-
if (!
|
|
3991
|
+
const data = path36.join(workspace, "contents.xcworkspacedata");
|
|
3992
|
+
if (!fs17.existsSync(data))
|
|
3730
3993
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
3731
|
-
const container =
|
|
3994
|
+
const container = path36.dirname(workspace);
|
|
3732
3995
|
const locate = (location, base) => {
|
|
3733
3996
|
const colon = location.indexOf(":");
|
|
3734
3997
|
const kind = location.slice(0, colon);
|
|
3735
3998
|
const rest = location.slice(colon + 1);
|
|
3736
|
-
if (kind === "group") return
|
|
3737
|
-
if (kind === "container" || kind === "self") return
|
|
3738
|
-
if (kind === "absolute") return
|
|
3739
|
-
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}`);
|
|
3740
4003
|
};
|
|
3741
4004
|
const groups = [container];
|
|
3742
4005
|
const references = [];
|
|
3743
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
4006
|
+
for (const [, closing, tag, attributes, selfClosing] of fs17.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
3744
4007
|
if (closing) {
|
|
3745
4008
|
if (tag === "Group") groups.pop();
|
|
3746
4009
|
continue;
|
|
@@ -3791,8 +4054,8 @@ function remotePackageRequirements(projects) {
|
|
|
3791
4054
|
var loaded = /* @__PURE__ */ new Map();
|
|
3792
4055
|
function xcodeProjectFile(xcodeproj) {
|
|
3793
4056
|
for (const name2 of ["project.pbxproj", "project.xcproj"]) {
|
|
3794
|
-
const file =
|
|
3795
|
-
if (
|
|
4057
|
+
const file = path36.join(xcodeproj, name2);
|
|
4058
|
+
if (fs17.existsSync(file)) return file;
|
|
3796
4059
|
}
|
|
3797
4060
|
return null;
|
|
3798
4061
|
}
|
|
@@ -3800,8 +4063,8 @@ function loadProject(xcodeproj) {
|
|
|
3800
4063
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
3801
4064
|
if (!projectFile)
|
|
3802
4065
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
3803
|
-
const source =
|
|
3804
|
-
const digest =
|
|
4066
|
+
const source = fs17.readFileSync(projectFile, "utf8");
|
|
4067
|
+
const digest = createHash20("sha256").update(source).digest("hex");
|
|
3805
4068
|
const cached = loaded.get(projectFile);
|
|
3806
4069
|
if (cached?.digest === digest) return cached.project;
|
|
3807
4070
|
const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
|
|
@@ -3809,25 +4072,25 @@ function loadProject(xcodeproj) {
|
|
|
3809
4072
|
throw new Error(`${projectFile} has no objects table`);
|
|
3810
4073
|
}
|
|
3811
4074
|
const objects = root.objects;
|
|
3812
|
-
const
|
|
4075
|
+
const object3 = (id) => {
|
|
3813
4076
|
const found = id === void 0 ? void 0 : objects[id];
|
|
3814
4077
|
return isDict(found) ? found : void 0;
|
|
3815
4078
|
};
|
|
3816
|
-
const project =
|
|
4079
|
+
const project = object3(str(root.rootObject));
|
|
3817
4080
|
if (!project || project.isa !== "PBXProject") {
|
|
3818
4081
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
3819
4082
|
}
|
|
3820
|
-
const projectDir =
|
|
3821
|
-
|
|
4083
|
+
const projectDir = fs17.realpathSync(
|
|
4084
|
+
path36.resolve(path36.dirname(xcodeproj), str(project.projectDirPath) ?? "")
|
|
3822
4085
|
);
|
|
3823
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
4086
|
+
const resolvePath = xcodePathResolver(objects, projectDir, path36.join);
|
|
3824
4087
|
const result = {
|
|
3825
4088
|
xcodeproj,
|
|
3826
4089
|
projectFile,
|
|
3827
4090
|
objects,
|
|
3828
4091
|
project,
|
|
3829
4092
|
projectDir,
|
|
3830
|
-
object,
|
|
4093
|
+
object: object3,
|
|
3831
4094
|
resolvePath,
|
|
3832
4095
|
visitMembers: xcodeTargetMemberVisitor(objects)
|
|
3833
4096
|
};
|
|
@@ -3857,8 +4120,8 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3857
4120
|
const relative2 = str(config.baseConfigurationReferenceRelativePath);
|
|
3858
4121
|
const own = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
3859
4122
|
const directory = anchor ? project.resolvePath(anchor) : null;
|
|
3860
|
-
const baseFile = base ? project.resolvePath(base) : directory && relative2 ?
|
|
3861
|
-
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)))
|
|
3862
4125
|
throw new Error(
|
|
3863
4126
|
`Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
|
|
3864
4127
|
);
|
|
@@ -3904,7 +4167,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3904
4167
|
const derivedSettings = {
|
|
3905
4168
|
DEVELOPER_DIR: () => options.environment?.DEVELOPER_DIR ?? process.env.DEVELOPER_DIR ?? (developerDir ?? (developerDir = process.platform === "darwin" ? (
|
|
3906
4169
|
// runner-toolchain-platform: darwin
|
|
3907
|
-
|
|
4170
|
+
execFileSync15("xcode-select", ["-p"], {
|
|
3908
4171
|
encoding: "utf8",
|
|
3909
4172
|
stdio: ["ignore", "pipe", "pipe"]
|
|
3910
4173
|
}).trim()
|
|
@@ -3912,6 +4175,11 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
|
|
|
3912
4175
|
PRODUCT_NAME: () => get("TARGET_NAME"),
|
|
3913
4176
|
PRODUCT_MODULE_NAME: () => applyOperator(get("PRODUCT_NAME"), "c99extidentifier"),
|
|
3914
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")}` : "",
|
|
3915
4183
|
// the native default of CoreBuildSystem.xcspec
|
|
3916
4184
|
EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES: () => "*.nib *.lproj *.framework *.gch *.xcode* *.xcassets *.icon (*) .DS_Store CVS .svn .git .hg *.pbproj *.pbxproj"
|
|
3917
4185
|
};
|
|
@@ -3951,26 +4219,26 @@ function scriptCommand(shell, script) {
|
|
|
3951
4219
|
return [executable, ...args, "-c", script];
|
|
3952
4220
|
}
|
|
3953
4221
|
function expandSearchPath(directory, rules2) {
|
|
3954
|
-
if (
|
|
4222
|
+
if (path36.basename(directory) !== "**") return [directory];
|
|
3955
4223
|
const expanded = [];
|
|
3956
4224
|
const seen = /* @__PURE__ */ new Set();
|
|
3957
|
-
const queue = [
|
|
4225
|
+
const queue = [path36.dirname(directory)];
|
|
3958
4226
|
for (let at = 0; at < queue.length; at++) {
|
|
3959
4227
|
const current = queue[at];
|
|
3960
4228
|
let real;
|
|
3961
4229
|
try {
|
|
3962
|
-
real =
|
|
4230
|
+
real = fs17.realpathSync(current);
|
|
3963
4231
|
} catch {
|
|
3964
4232
|
continue;
|
|
3965
4233
|
}
|
|
3966
|
-
if (!
|
|
4234
|
+
if (!fs17.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
3967
4235
|
seen.add(real);
|
|
3968
4236
|
expanded.push(current);
|
|
3969
|
-
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)) {
|
|
3970
4238
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
3971
4239
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
3972
4240
|
continue;
|
|
3973
|
-
queue.push(
|
|
4241
|
+
queue.push(path36.join(current, entry.name));
|
|
3974
4242
|
}
|
|
3975
4243
|
}
|
|
3976
4244
|
return expanded;
|
|
@@ -4041,7 +4309,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
4041
4309
|
for (const token of tokens) {
|
|
4042
4310
|
if (token.startsWith("-")) break;
|
|
4043
4311
|
const file = resolve(token);
|
|
4044
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
4312
|
+
if (file?.endsWith(".xcassets")) catalogs.push(path36.resolve(projectDir, file));
|
|
4045
4313
|
}
|
|
4046
4314
|
}
|
|
4047
4315
|
return catalogs;
|
|
@@ -4086,14 +4354,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
4086
4354
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
4087
4355
|
return [];
|
|
4088
4356
|
copies.push({
|
|
4089
|
-
from:
|
|
4090
|
-
to:
|
|
4357
|
+
from: path36.resolve(projectDir, operands[0]),
|
|
4358
|
+
to: path36.resolve(projectDir, operands[1])
|
|
4091
4359
|
});
|
|
4092
4360
|
}
|
|
4093
4361
|
return copies;
|
|
4094
4362
|
}
|
|
4095
4363
|
function fileListEntries(file, absolute) {
|
|
4096
|
-
return
|
|
4364
|
+
return fs17.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
4097
4365
|
}
|
|
4098
4366
|
function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
4099
4367
|
const { project, target, id: targetId } = ref;
|
|
@@ -4106,7 +4374,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4106
4374
|
const copiedFiles = [];
|
|
4107
4375
|
let generatedInfoPlist = false;
|
|
4108
4376
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
4109
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
4377
|
+
const infoPlistOutput = declaredInfoPlist ? path36.resolve(project.projectDir, declaredInfoPlist) : null;
|
|
4110
4378
|
const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
|
|
4111
4379
|
for (const phaseId of list(target.buildPhases)) {
|
|
4112
4380
|
const phase = project.object(phaseId);
|
|
@@ -4121,7 +4389,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4121
4389
|
copiedFiles.push(
|
|
4122
4390
|
...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
|
|
4123
4391
|
);
|
|
4124
|
-
const absolute = (raw) =>
|
|
4392
|
+
const absolute = (raw) => path36.resolve(project.projectDir, expand(raw, settings));
|
|
4125
4393
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
4126
4394
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
4127
4395
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -4130,7 +4398,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4130
4398
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
4131
4399
|
).map((raw) => {
|
|
4132
4400
|
const file = absolute(raw);
|
|
4133
|
-
if (!
|
|
4401
|
+
if (!fs17.existsSync(file)) {
|
|
4134
4402
|
return { file, entries: [] };
|
|
4135
4403
|
}
|
|
4136
4404
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -4151,7 +4419,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4151
4419
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
4152
4420
|
];
|
|
4153
4421
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
4154
|
-
for (const file of inputFiles) if (
|
|
4422
|
+
for (const file of inputFiles) if (fs17.existsSync(file)) projectInputs.add(file);
|
|
4155
4423
|
}
|
|
4156
4424
|
if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
|
|
4157
4425
|
const configuration = settings("CONFIGURATION");
|
|
@@ -4164,10 +4432,10 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4164
4432
|
false
|
|
4165
4433
|
))
|
|
4166
4434
|
continue;
|
|
4167
|
-
const phaseDir =
|
|
4435
|
+
const phaseDir = path36.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
4168
4436
|
for (const lists of fileLists.values())
|
|
4169
4437
|
for (const { file } of lists)
|
|
4170
|
-
if (!
|
|
4438
|
+
if (!fs17.existsSync(file))
|
|
4171
4439
|
throw new Error(
|
|
4172
4440
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
4173
4441
|
);
|
|
@@ -4186,25 +4454,25 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4186
4454
|
const lists = fileLists.get(kind);
|
|
4187
4455
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
4188
4456
|
lists.forEach((_item, index) => {
|
|
4189
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
4457
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path36.join(
|
|
4190
4458
|
phaseDir,
|
|
4191
4459
|
`${kind}-${index}.xcfilelist`
|
|
4192
4460
|
);
|
|
4193
4461
|
});
|
|
4194
4462
|
}
|
|
4195
|
-
const signature =
|
|
4463
|
+
const signature = createHash20("sha256").update(
|
|
4196
4464
|
JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
|
|
4197
4465
|
);
|
|
4198
4466
|
for (const file of inputFiles) {
|
|
4199
4467
|
signature.update(file);
|
|
4200
|
-
if (
|
|
4201
|
-
const stat =
|
|
4468
|
+
if (fs17.existsSync(file)) {
|
|
4469
|
+
const stat = fs17.statSync(file);
|
|
4202
4470
|
signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
|
|
4203
4471
|
} else signature.update("missing");
|
|
4204
4472
|
}
|
|
4205
4473
|
const stamp = signature.digest("hex");
|
|
4206
4474
|
const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
4207
|
-
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) =>
|
|
4475
|
+
if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs17.existsSync(file))) {
|
|
4208
4476
|
preparedXcodePhase(
|
|
4209
4477
|
project.projectFile,
|
|
4210
4478
|
targetId,
|
|
@@ -4215,14 +4483,14 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4215
4483
|
);
|
|
4216
4484
|
continue;
|
|
4217
4485
|
}
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4486
|
+
fs17.mkdirSync(phaseDir, { recursive: true });
|
|
4487
|
+
fs17.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
4488
|
+
fs17.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
4221
4489
|
for (const output2 of allOutputs)
|
|
4222
|
-
|
|
4490
|
+
fs17.mkdirSync(path36.dirname(output2), { recursive: true });
|
|
4223
4491
|
for (const [kind, lists] of fileLists)
|
|
4224
4492
|
lists.forEach((item, index) => {
|
|
4225
|
-
|
|
4493
|
+
fs17.writeFileSync(
|
|
4226
4494
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
4227
4495
|
`${item.entries.join("\n")}
|
|
4228
4496
|
`
|
|
@@ -4233,7 +4501,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
|
|
|
4233
4501
|
str(phase.shellPath) ?? "/bin/sh",
|
|
4234
4502
|
str(phase.shellScript) ?? ""
|
|
4235
4503
|
);
|
|
4236
|
-
|
|
4504
|
+
execFileSync15(shell, args, {
|
|
4237
4505
|
cwd: project.projectDir,
|
|
4238
4506
|
env,
|
|
4239
4507
|
stdio: ["ignore", "pipe", "pipe"],
|
|
@@ -4249,7 +4517,7 @@ ${output2}`
|
|
|
4249
4517
|
);
|
|
4250
4518
|
}
|
|
4251
4519
|
const missing = allOutputs.filter(
|
|
4252
|
-
(file) => file === infoPlistOutput && !
|
|
4520
|
+
(file) => file === infoPlistOutput && !fs17.existsSync(file)
|
|
4253
4521
|
);
|
|
4254
4522
|
if (missing.length > 0)
|
|
4255
4523
|
throw new Error(
|
|
@@ -4269,8 +4537,8 @@ ${output2}`
|
|
|
4269
4537
|
project.visitMembers(
|
|
4270
4538
|
targetId,
|
|
4271
4539
|
project.resolvePath,
|
|
4272
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
4273
|
-
|
|
4540
|
+
(file) => isDirectory(file) ? walkFiles(file) : fs17.existsSync(file) ? [file] : [],
|
|
4541
|
+
path36.join,
|
|
4274
4542
|
(file, kind) => {
|
|
4275
4543
|
if (kind === "header") {
|
|
4276
4544
|
headers.add(file);
|
|
@@ -4280,9 +4548,9 @@ ${output2}`
|
|
|
4280
4548
|
resources.add(file);
|
|
4281
4549
|
return;
|
|
4282
4550
|
}
|
|
4283
|
-
if (!
|
|
4551
|
+
if (!fs17.existsSync(file)) {
|
|
4284
4552
|
if (options.requireSources === false) return;
|
|
4285
|
-
const script = scriptForOutput.get(
|
|
4553
|
+
const script = scriptForOutput.get(path36.normalize(file));
|
|
4286
4554
|
throw new Error(
|
|
4287
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}`
|
|
4288
4556
|
);
|
|
@@ -4303,37 +4571,37 @@ ${output2}`
|
|
|
4303
4571
|
function commonAncestor(dirs) {
|
|
4304
4572
|
let common = dirs[0];
|
|
4305
4573
|
for (const dir of dirs) {
|
|
4306
|
-
while (common !==
|
|
4307
|
-
common =
|
|
4574
|
+
while (common !== path36.dirname(common) && path36.relative(common, dir).startsWith(".."))
|
|
4575
|
+
common = path36.dirname(common);
|
|
4308
4576
|
}
|
|
4309
4577
|
return common;
|
|
4310
4578
|
}
|
|
4311
|
-
var isPodsProject = (xcodeproj) =>
|
|
4579
|
+
var isPodsProject = (xcodeproj) => path36.basename(xcodeproj) === "Pods.xcodeproj" && path36.basename(path36.dirname(xcodeproj)) === "Pods";
|
|
4312
4580
|
function installedPodsSandbox(pods) {
|
|
4313
|
-
const podfileLock =
|
|
4314
|
-
const manifestLock =
|
|
4315
|
-
if (!
|
|
4581
|
+
const podfileLock = path36.join(path36.dirname(pods), "Podfile.lock");
|
|
4582
|
+
const manifestLock = path36.join(pods, "Manifest.lock");
|
|
4583
|
+
if (!fs17.existsSync(podfileLock))
|
|
4316
4584
|
throw new Error(
|
|
4317
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
4585
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${path36.dirname(pods)}`
|
|
4318
4586
|
);
|
|
4319
|
-
if (!
|
|
4587
|
+
if (!fs17.existsSync(manifestLock) || !fs17.readFileSync(manifestLock).equals(fs17.readFileSync(podfileLock)))
|
|
4320
4588
|
throw new Error(
|
|
4321
|
-
`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)}`
|
|
4322
4590
|
);
|
|
4323
4591
|
const specChecksums = {};
|
|
4324
|
-
const lines =
|
|
4592
|
+
const lines = fs17.readFileSync(manifestLock, "utf8").split("\n");
|
|
4325
4593
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
4326
4594
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
4327
4595
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
4328
4596
|
if (!entry) break;
|
|
4329
4597
|
specChecksums[entry[1]] = entry[2];
|
|
4330
4598
|
}
|
|
4331
|
-
const specs =
|
|
4599
|
+
const specs = path36.join(pods, "Local Podspecs");
|
|
4332
4600
|
return {
|
|
4333
4601
|
podfileLock,
|
|
4334
4602
|
manifestLock,
|
|
4335
4603
|
specChecksums,
|
|
4336
|
-
localPodspecs: isDirectory(specs) ?
|
|
4604
|
+
localPodspecs: isDirectory(specs) ? fs17.readdirSync(specs).filter((name2) => name2.endsWith(".podspec.json")).sort().map((name2) => path36.join(specs, name2)) : []
|
|
4337
4605
|
};
|
|
4338
4606
|
}
|
|
4339
4607
|
function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
@@ -4345,14 +4613,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
4345
4613
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
4346
4614
|
if (installedPods && isPodsProject(xcodeproj))
|
|
4347
4615
|
throw new Error(
|
|
4348
|
-
`${
|
|
4616
|
+
`${path36.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path36.dirname(path36.dirname(xcodeproj))}`
|
|
4349
4617
|
);
|
|
4350
4618
|
return;
|
|
4351
4619
|
}
|
|
4352
|
-
const key =
|
|
4353
|
-
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"))
|
|
4354
4622
|
return;
|
|
4355
|
-
if (isPodsProject(key)) cocoapods = installedPodsSandbox(
|
|
4623
|
+
if (isPodsProject(key)) cocoapods = installedPodsSandbox(path36.dirname(key));
|
|
4356
4624
|
const project = loadProject(key);
|
|
4357
4625
|
projectAt.set(key, project);
|
|
4358
4626
|
projects.push(project);
|
|
@@ -4368,12 +4636,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
4368
4636
|
for (const reference of listed)
|
|
4369
4637
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
4370
4638
|
if (projects.length === 0) {
|
|
4371
|
-
throw new Error(`${
|
|
4639
|
+
throw new Error(`${path36.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
4372
4640
|
}
|
|
4373
|
-
const podfile =
|
|
4374
|
-
if (installedPods && !cocoapods &&
|
|
4641
|
+
const podfile = path36.join(path36.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
4642
|
+
if (installedPods && !cocoapods && fs17.existsSync(podfile))
|
|
4375
4643
|
throw new Error(
|
|
4376
|
-
`${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`
|
|
4377
4645
|
);
|
|
4378
4646
|
return { listed, projects, projectAt, cocoapods };
|
|
4379
4647
|
}
|
|
@@ -4409,7 +4677,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
|
|
|
4409
4677
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
|
|
4410
4678
|
}
|
|
4411
4679
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
4412
|
-
const project = loadProject(
|
|
4680
|
+
const project = loadProject(fs17.realpathSync(xcodeproj));
|
|
4413
4681
|
for (const [id, target] of Object.entries(project.objects)) {
|
|
4414
4682
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
4415
4683
|
if (isIosAppTarget({ project, id, target }, { requireSources: false }))
|
|
@@ -4417,30 +4685,30 @@ function defaultXcodeAppTarget(xcodeproj) {
|
|
|
4417
4685
|
}
|
|
4418
4686
|
}
|
|
4419
4687
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
4420
|
-
const container =
|
|
4688
|
+
const container = fs17.realpathSync(xcodeprojOrWorkspace);
|
|
4421
4689
|
const { projects } = workspaceProjects(container);
|
|
4422
4690
|
const containers = [
|
|
4423
4691
|
.../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
|
|
4424
4692
|
];
|
|
4425
4693
|
const found = containers.flatMap(
|
|
4426
4694
|
(dir) => [
|
|
4427
|
-
|
|
4428
|
-
...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)) : []
|
|
4429
4697
|
].map((data) => ({
|
|
4430
4698
|
dir,
|
|
4431
|
-
file:
|
|
4699
|
+
file: path36.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
4432
4700
|
}))
|
|
4433
|
-
).find((candidate) =>
|
|
4701
|
+
).find((candidate) => fs17.existsSync(candidate.file));
|
|
4434
4702
|
if (!found) {
|
|
4435
4703
|
const known = containers.flatMap(
|
|
4436
|
-
(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() : []
|
|
4437
4705
|
);
|
|
4438
4706
|
throw new Error(
|
|
4439
|
-
`${
|
|
4707
|
+
`${path36.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
4440
4708
|
);
|
|
4441
4709
|
}
|
|
4442
4710
|
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
4443
|
-
|
|
4711
|
+
fs17.readFileSync(found.file, "utf8")
|
|
4444
4712
|
);
|
|
4445
4713
|
const attribute = (text2, name3) => {
|
|
4446
4714
|
const value = new RegExp(`\\b${name3}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
|
|
@@ -4453,12 +4721,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
4453
4721
|
if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
|
|
4454
4722
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
4455
4723
|
}
|
|
4456
|
-
const projectPath =
|
|
4457
|
-
|
|
4724
|
+
const projectPath = path36.resolve(
|
|
4725
|
+
path36.dirname(found.dir),
|
|
4458
4726
|
referenced.slice("container:".length)
|
|
4459
4727
|
);
|
|
4460
4728
|
const project = projects.find(
|
|
4461
|
-
(candidate) =>
|
|
4729
|
+
(candidate) => fs17.existsSync(projectPath) && candidate.xcodeproj === fs17.realpathSync(projectPath)
|
|
4462
4730
|
);
|
|
4463
4731
|
const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
|
|
4464
4732
|
const name2 = target && str(target.target.name);
|
|
@@ -4468,26 +4736,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
4468
4736
|
var NativeAppTargetSelectionError = class extends Error {
|
|
4469
4737
|
};
|
|
4470
4738
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
4471
|
-
const nested =
|
|
4472
|
-
const iosRoot =
|
|
4473
|
-
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 });
|
|
4474
4742
|
const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
4475
|
-
xcodeproj:
|
|
4743
|
+
xcodeproj: path36.join(iosRoot, entry.name),
|
|
4476
4744
|
workspace: null
|
|
4477
4745
|
})) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
4478
|
-
const workspace =
|
|
4746
|
+
const workspace = path36.join(iosRoot, entry.name);
|
|
4479
4747
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
4480
4748
|
xcodeproj: xcodeproj2,
|
|
4481
4749
|
workspace
|
|
4482
4750
|
}));
|
|
4483
4751
|
}).filter(
|
|
4484
|
-
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(
|
|
4752
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path36.sep).includes("Pods") && fs17.existsSync(xcodeproj2)
|
|
4485
4753
|
).filter(
|
|
4486
4754
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
4487
4755
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
4488
4756
|
xcodeproj: xcodeproj2,
|
|
4489
4757
|
workspace,
|
|
4490
|
-
name:
|
|
4758
|
+
name: path36.basename(xcodeproj2)
|
|
4491
4759
|
}));
|
|
4492
4760
|
if (projects.length === 0) return null;
|
|
4493
4761
|
if (projects.length > 1 && !iosTarget) {
|
|
@@ -4516,13 +4784,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
4516
4784
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
4517
4785
|
if (!iosTarget) {
|
|
4518
4786
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
4519
|
-
const container =
|
|
4787
|
+
const container = fs17.existsSync(workspace) ? workspace : xcodeproj;
|
|
4520
4788
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
4521
|
-
if (
|
|
4789
|
+
if (fs17.existsSync(path36.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
4522
4790
|
return true;
|
|
4523
|
-
const users =
|
|
4524
|
-
return
|
|
4525
|
-
(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`))
|
|
4526
4794
|
);
|
|
4527
4795
|
});
|
|
4528
4796
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -4531,8 +4799,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
4531
4799
|
throw new Error(`native app identity has no application target ${target}`);
|
|
4532
4800
|
return { xcodeproj, target, workspace: project.workspace };
|
|
4533
4801
|
}
|
|
4534
|
-
var workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
4535
|
-
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace :
|
|
4802
|
+
var workspaceResolvedFile = (xcodeprojOrWorkspace) => path36.join(
|
|
4803
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path36.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
4536
4804
|
"xcshareddata",
|
|
4537
4805
|
"swiftpm",
|
|
4538
4806
|
"Package.resolved"
|
|
@@ -4547,7 +4815,7 @@ var SwiftPackageResolutionRequired = class extends Error {
|
|
|
4547
4815
|
}
|
|
4548
4816
|
};
|
|
4549
4817
|
function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
|
|
4550
|
-
const xcodeprojOrWorkspace =
|
|
4818
|
+
const xcodeprojOrWorkspace = fs17.realpathSync(input);
|
|
4551
4819
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
4552
4820
|
const { listed, projects, projectAt, cocoapods } = workspaceProjects(
|
|
4553
4821
|
xcodeprojOrWorkspace,
|
|
@@ -4556,7 +4824,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4556
4824
|
const allTargets = projects.flatMap(projectTargets);
|
|
4557
4825
|
const appTargets = allTargets.filter((ref) => isIosAppTarget(ref, options));
|
|
4558
4826
|
const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
|
|
4559
|
-
const container =
|
|
4827
|
+
const container = path36.basename(xcodeprojOrWorkspace);
|
|
4560
4828
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
4561
4829
|
if (named.length !== 1) {
|
|
4562
4830
|
if (appTargets.length === 0)
|
|
@@ -4577,31 +4845,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4577
4845
|
for (const ref of allTargets) {
|
|
4578
4846
|
const product = ref.project.object(str(ref.target.productReference));
|
|
4579
4847
|
const file = str(product?.path);
|
|
4580
|
-
if (file && !byProduct.has(
|
|
4581
|
-
byProduct.set(
|
|
4848
|
+
if (file && !byProduct.has(path36.basename(file)))
|
|
4849
|
+
byProduct.set(path36.basename(file), ref);
|
|
4582
4850
|
}
|
|
4583
4851
|
const proxied = (project, proxyId) => {
|
|
4584
4852
|
const proxy = project.object(proxyId);
|
|
4585
4853
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
4586
4854
|
const portal = str(proxy.containerPortal);
|
|
4587
4855
|
const portalPath = project.resolvePath(portal ?? "");
|
|
4588
|
-
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;
|
|
4589
4857
|
const remote = str(proxy.remoteGlobalIDString);
|
|
4590
4858
|
if (!owner || !remote) return void 0;
|
|
4591
4859
|
return projectTargets(owner).find(
|
|
4592
4860
|
(ref) => ref.id === remote || str(ref.target.productReference) === remote
|
|
4593
4861
|
);
|
|
4594
4862
|
};
|
|
4595
|
-
const
|
|
4863
|
+
const linkedTargets = (ref) => {
|
|
4596
4864
|
const { project, target } = ref;
|
|
4597
4865
|
const found = [];
|
|
4598
|
-
for (const dependencyId of list(target.dependencies)) {
|
|
4599
|
-
const dependency = project.object(dependencyId);
|
|
4600
|
-
if (!dependency || !xcodeBuildFileBuildsForIos(dependency)) continue;
|
|
4601
|
-
const direct = str(dependency.target);
|
|
4602
|
-
const resolved = direct ? projectTargets(project).find((candidate) => candidate.id === direct) : proxied(project, str(dependency.targetProxy));
|
|
4603
|
-
if (resolved) found.push(resolved);
|
|
4604
|
-
}
|
|
4605
4866
|
for (const phaseId of list(target.buildPhases)) {
|
|
4606
4867
|
const phase = project.object(phaseId);
|
|
4607
4868
|
if (phase?.isa !== "PBXFrameworksBuildPhase") continue;
|
|
@@ -4609,11 +4870,38 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4609
4870
|
const buildFile = project.object(buildFileId);
|
|
4610
4871
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
4611
4872
|
const file = project.object(str(buildFile.fileRef));
|
|
4612
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
4613
|
-
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
|
+
});
|
|
4614
4881
|
}
|
|
4615
4882
|
}
|
|
4616
|
-
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(
|
|
4617
4905
|
(candidate) => candidate.target.isa === "PBXAggregateTarget" || candidate.target.productType === RESOURCE_BUNDLE || MODULE_PRODUCTS.has(str(candidate.target.productType) ?? "")
|
|
4618
4906
|
);
|
|
4619
4907
|
};
|
|
@@ -4666,8 +4954,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4666
4954
|
ref.project.visitMembers(
|
|
4667
4955
|
ref.id,
|
|
4668
4956
|
ref.project.resolvePath,
|
|
4669
|
-
(file) => isDirectory(file) ? walkFiles(file) :
|
|
4670
|
-
|
|
4957
|
+
(file) => isDirectory(file) ? walkFiles(file) : fs17.existsSync(file) ? [file] : [],
|
|
4958
|
+
path36.join,
|
|
4671
4959
|
(file, kind) => {
|
|
4672
4960
|
if (kind === "header") found.push(file);
|
|
4673
4961
|
}
|
|
@@ -4683,12 +4971,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4683
4971
|
for (const ref of projectTargets(project)) {
|
|
4684
4972
|
const product = productName(ref);
|
|
4685
4973
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
4686
|
-
const name2 =
|
|
4974
|
+
const name2 = path36.basename(file);
|
|
4687
4975
|
if (!entries.has(name2))
|
|
4688
4976
|
entries.set(name2, visibility !== "Project" ? `${product}/${name2}` : file);
|
|
4689
4977
|
}
|
|
4690
4978
|
for (const file of synchronizedHeaders(ref)) {
|
|
4691
|
-
const name2 =
|
|
4979
|
+
const name2 = path36.basename(file);
|
|
4692
4980
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
4693
4981
|
}
|
|
4694
4982
|
}
|
|
@@ -4698,7 +4986,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4698
4986
|
if (folder === null) continue;
|
|
4699
4987
|
for (const file of walkFiles(folder)) {
|
|
4700
4988
|
if (!HEADER_FILE.test(file)) continue;
|
|
4701
|
-
const name2 =
|
|
4989
|
+
const name2 = path36.basename(file);
|
|
4702
4990
|
if (!entries.has(name2)) entries.set(name2, file);
|
|
4703
4991
|
}
|
|
4704
4992
|
}
|
|
@@ -4706,18 +4994,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4706
4994
|
for (const id of Object.keys(project.objects)) {
|
|
4707
4995
|
if (project.object(id)?.isa !== "PBXFileReference") continue;
|
|
4708
4996
|
const file = project.resolvePath(id);
|
|
4709
|
-
if (file && HEADER_FILE.test(file) && !entries.has(
|
|
4710
|
-
entries.set(
|
|
4997
|
+
if (file && HEADER_FILE.test(file) && !entries.has(path36.basename(file)))
|
|
4998
|
+
entries.set(path36.basename(file), file);
|
|
4711
4999
|
}
|
|
4712
5000
|
const map = [...entries];
|
|
4713
5001
|
projectHeaderMaps.set(project, map);
|
|
4714
5002
|
return map;
|
|
4715
5003
|
};
|
|
4716
5004
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
4717
|
-
const buildDir = (project) =>
|
|
5005
|
+
const buildDir = (project) => path36.join(project.projectDir, ".build/peach-xcode/Build");
|
|
4718
5006
|
const workspaceBuild = {
|
|
4719
|
-
SYMROOT:
|
|
4720
|
-
OBJROOT:
|
|
5007
|
+
SYMROOT: path36.join(buildDir(app.project), "Products"),
|
|
5008
|
+
OBJROOT: path36.join(buildDir(app.project), "Intermediates.noindex")
|
|
4721
5009
|
};
|
|
4722
5010
|
const moduleTarget = (ref) => {
|
|
4723
5011
|
const name2 = str(ref.target.name) ?? ref.id;
|
|
@@ -4732,15 +5020,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4732
5020
|
TARGET_NAME: name2,
|
|
4733
5021
|
TARGETNAME: "$(TARGET_NAME)",
|
|
4734
5022
|
PROJECT: "$(PROJECT_NAME)",
|
|
4735
|
-
PROJECT_NAME:
|
|
5023
|
+
PROJECT_NAME: path36.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
4736
5024
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
4737
5025
|
SRCROOT: ref.project.projectDir,
|
|
4738
5026
|
SOURCE_ROOT: ref.project.projectDir,
|
|
4739
5027
|
PROJECT_DIR: ref.project.projectDir,
|
|
4740
|
-
SYMROOT:
|
|
5028
|
+
SYMROOT: path36.join(buildDir(ref.project), "Products"),
|
|
4741
5029
|
BUILD_DIR: "$(SYMROOT)",
|
|
4742
5030
|
BUILD_ROOT: "$(SYMROOT)",
|
|
4743
|
-
OBJROOT:
|
|
5031
|
+
OBJROOT: path36.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
4744
5032
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
4745
5033
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
4746
5034
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -4782,7 +5070,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4782
5070
|
xcconfigs
|
|
4783
5071
|
);
|
|
4784
5072
|
const searchRules = recursiveSearchRules(settings2);
|
|
4785
|
-
const absolute = (file) =>
|
|
5073
|
+
const absolute = (file) => path36.resolve(ref.project.projectDir, file);
|
|
4786
5074
|
const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
|
|
4787
5075
|
const product = settings2("PRODUCT_NAME");
|
|
4788
5076
|
const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -4813,7 +5101,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4813
5101
|
`${name2}: Swift compatibility header phase has no Swift producer sources`
|
|
4814
5102
|
);
|
|
4815
5103
|
const building = options.prepareGeneratedSources && options.requireSources !== false;
|
|
4816
|
-
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;
|
|
4817
5105
|
if (versioning) {
|
|
4818
5106
|
const version = settings2("CURRENT_PROJECT_VERSION");
|
|
4819
5107
|
const custom = [
|
|
@@ -4826,22 +5114,22 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4826
5114
|
].filter((key) => settings2(key));
|
|
4827
5115
|
if (custom.length)
|
|
4828
5116
|
throw new Error(
|
|
4829
|
-
`${name2}: Xcode generates ${
|
|
5117
|
+
`${name2}: Xcode generates ${path36.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
4830
5118
|
);
|
|
4831
5119
|
const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
4832
5120
|
const [major, minor] = version.split(".");
|
|
4833
|
-
const
|
|
5121
|
+
const number2 = `${major === "" ? "0" : major}.${minor !== void 0 && /^\d+$/.test(minor) ? minor.replace(/^0+(?=\d)/, "") : ""}`;
|
|
4834
5122
|
const unit = [
|
|
4835
5123
|
` extern const unsigned char ${symbol}VersionString[];`,
|
|
4836
5124
|
` extern const double ${symbol}VersionNumber;`,
|
|
4837
5125
|
"",
|
|
4838
5126
|
` const unsigned char ${symbol}VersionString[] __attribute__ ((used)) = "@(#)PROGRAM:${product} PROJECT:${settings2("PROJECT_NAME")}-${version}" "\\n";`,
|
|
4839
|
-
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${
|
|
5127
|
+
` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number2};`,
|
|
4840
5128
|
""
|
|
4841
5129
|
].join("\n");
|
|
4842
|
-
if (!
|
|
4843
|
-
|
|
4844
|
-
|
|
5130
|
+
if (!fs17.existsSync(versioning) || fs17.readFileSync(versioning, "utf8") !== unit) {
|
|
5131
|
+
fs17.mkdirSync(path36.dirname(versioning), { recursive: true });
|
|
5132
|
+
fs17.writeFileSync(versioning, unit);
|
|
4845
5133
|
}
|
|
4846
5134
|
allSources.push(versioning);
|
|
4847
5135
|
}
|
|
@@ -4860,7 +5148,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4860
5148
|
const headerFiles = headerPhase(ref);
|
|
4861
5149
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
4862
5150
|
for (const { file, visibility } of headerFiles) {
|
|
4863
|
-
const name3 =
|
|
5151
|
+
const name3 = path36.basename(file);
|
|
4864
5152
|
const published = visibility !== "Project";
|
|
4865
5153
|
if (!ownHeaders.has(name3))
|
|
4866
5154
|
ownHeaders.set(name3, published ? `${product}/${name3}` : file);
|
|
@@ -4868,7 +5156,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4868
5156
|
ownHeaders.set(`${product}/${name3}`, file);
|
|
4869
5157
|
}
|
|
4870
5158
|
for (const file of synchronizedHeaders(ref)) {
|
|
4871
|
-
const name3 =
|
|
5159
|
+
const name3 = path36.basename(file);
|
|
4872
5160
|
if (ownHeaders.has(name3)) continue;
|
|
4873
5161
|
ownHeaders.set(name3, file);
|
|
4874
5162
|
const qualified = `${product}/${name3}`;
|
|
@@ -4880,24 +5168,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4880
5168
|
const otherProduct = productName(other);
|
|
4881
5169
|
for (const { file, visibility } of headerPhase(other)) {
|
|
4882
5170
|
if (visibility === "Project") continue;
|
|
4883
|
-
const key = `${otherProduct}/${
|
|
5171
|
+
const key = `${otherProduct}/${path36.basename(file)}`;
|
|
4884
5172
|
if (!nonFrameworkHeaders.has(key)) nonFrameworkHeaders.set(key, file);
|
|
4885
5173
|
}
|
|
4886
5174
|
}
|
|
4887
|
-
const wrapper =
|
|
5175
|
+
const wrapper = path36.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
4888
5176
|
const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
4889
|
-
const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ?
|
|
4890
|
-
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) ? {
|
|
4891
5179
|
framework: true,
|
|
4892
5180
|
moduleMap,
|
|
4893
5181
|
umbrella: frameworkUmbrella,
|
|
4894
|
-
outputModuleMap:
|
|
4895
|
-
outputUmbrella:
|
|
5182
|
+
outputModuleMap: path36.join(wrapper, "Modules", "module.modulemap"),
|
|
5183
|
+
outputUmbrella: path36.join(
|
|
4896
5184
|
wrapper,
|
|
4897
5185
|
"Headers",
|
|
4898
|
-
|
|
5186
|
+
path36.basename(frameworkUmbrella)
|
|
4899
5187
|
),
|
|
4900
|
-
outputHeader:
|
|
5188
|
+
outputHeader: path36.join(
|
|
4901
5189
|
wrapper,
|
|
4902
5190
|
"Headers",
|
|
4903
5191
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
|
|
@@ -4911,10 +5199,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4911
5199
|
outputUmbrella: compatibility.outputUmbrella,
|
|
4912
5200
|
outputHeader: compatibility.outputHeader
|
|
4913
5201
|
} : frameworkCompatibility;
|
|
4914
|
-
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) => {
|
|
4915
5203
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
4916
|
-
const file =
|
|
4917
|
-
return
|
|
5204
|
+
const file = path36.join(path36.dirname(moduleMap), entry);
|
|
5205
|
+
return fs17.existsSync(file) ? [file] : [];
|
|
4918
5206
|
}) : [];
|
|
4919
5207
|
const fileFlags = {};
|
|
4920
5208
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -4938,6 +5226,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4938
5226
|
settings: settings2,
|
|
4939
5227
|
keys,
|
|
4940
5228
|
module: {
|
|
5229
|
+
id: `${ref.project.projectFile}#${ref.id}`,
|
|
4941
5230
|
name: name2,
|
|
4942
5231
|
targetIdentity: JSON.stringify([ref.project.xcodeproj, ref.id]),
|
|
4943
5232
|
targetDependencies: Array(),
|
|
@@ -4986,15 +5275,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
4986
5275
|
// xcode searches its products' include directory before
|
|
4987
5276
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
4988
5277
|
headerSearchPaths: [
|
|
4989
|
-
|
|
5278
|
+
path36.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
4990
5279
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
4991
5280
|
(raw) => expandSearchPath(absolute(raw), searchRules)
|
|
4992
5281
|
),
|
|
4993
|
-
|
|
5282
|
+
path36.join(
|
|
4994
5283
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
4995
5284
|
settings2("CURRENT_ARCH")
|
|
4996
5285
|
),
|
|
4997
|
-
|
|
5286
|
+
path36.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
4998
5287
|
settings2("DERIVED_FILE_DIR")
|
|
4999
5288
|
],
|
|
5000
5289
|
userHeaderSearchPaths: settingList(
|
|
@@ -5044,10 +5333,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5044
5333
|
...headerFiles.flatMap(
|
|
5045
5334
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
5046
5335
|
[
|
|
5047
|
-
|
|
5336
|
+
path36.join(
|
|
5048
5337
|
wrapper,
|
|
5049
5338
|
visibility === "Public" ? "Headers" : "PrivateHeaders",
|
|
5050
|
-
|
|
5339
|
+
path36.basename(file)
|
|
5051
5340
|
),
|
|
5052
5341
|
file
|
|
5053
5342
|
]
|
|
@@ -5061,7 +5350,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5061
5350
|
return [];
|
|
5062
5351
|
const destination = expand(
|
|
5063
5352
|
str(phase.dstPath) ?? "",
|
|
5064
|
-
(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)
|
|
5065
5354
|
);
|
|
5066
5355
|
return list(phase.files).flatMap((id) => {
|
|
5067
5356
|
const file = ref.project.resolvePath(
|
|
@@ -5069,17 +5358,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5069
5358
|
);
|
|
5070
5359
|
return file && HEADER_FILE.test(file) ? [
|
|
5071
5360
|
[
|
|
5072
|
-
|
|
5361
|
+
path36.resolve(
|
|
5073
5362
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
5074
5363
|
destination,
|
|
5075
|
-
|
|
5364
|
+
path36.basename(file)
|
|
5076
5365
|
),
|
|
5077
5366
|
file
|
|
5078
5367
|
]
|
|
5079
5368
|
] : [];
|
|
5080
5369
|
});
|
|
5081
5370
|
}),
|
|
5082
|
-
...moduleMap ? [[
|
|
5371
|
+
...moduleMap ? [[path36.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
|
|
5083
5372
|
]) : Object.fromEntries([
|
|
5084
5373
|
...podHeaders.map((file) => [file, file]),
|
|
5085
5374
|
...moduleMap ? [[moduleMap, moduleMap]] : []
|
|
@@ -5111,7 +5400,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5111
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 }));
|
|
5112
5401
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
5113
5402
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
5114
|
-
({ 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)) : []
|
|
5115
5404
|
);
|
|
5116
5405
|
const expandValue = (value, settings2) => {
|
|
5117
5406
|
if (typeof value === "string") return expand(value, settings2);
|
|
@@ -5132,7 +5421,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5132
5421
|
const phase = owner.ref.project.object(phaseId);
|
|
5133
5422
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
|
|
5134
5423
|
continue;
|
|
5135
|
-
const absolute = (raw) =>
|
|
5424
|
+
const absolute = (raw) => path36.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
|
|
5136
5425
|
const entries = (paths) => paths.flatMap((raw) => {
|
|
5137
5426
|
const file = absolute(raw);
|
|
5138
5427
|
xcconfigs.add(file);
|
|
@@ -5148,7 +5437,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5148
5437
|
].filter((file) => file.endsWith(".bundle"));
|
|
5149
5438
|
if (inputs.length !== outputs.length)
|
|
5150
5439
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
5151
|
-
const destinationRoot =
|
|
5440
|
+
const destinationRoot = path36.join(
|
|
5152
5441
|
owner.settings("TARGET_BUILD_DIR"),
|
|
5153
5442
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
5154
5443
|
);
|
|
@@ -5157,24 +5446,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5157
5446
|
const file = str(
|
|
5158
5447
|
target.ref.project.object(str(target.ref.target.productReference))?.path
|
|
5159
5448
|
);
|
|
5160
|
-
return file &&
|
|
5449
|
+
return file && path36.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
5161
5450
|
});
|
|
5162
5451
|
if (!product && !isDirectory(input2))
|
|
5163
5452
|
throw new Error(
|
|
5164
5453
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
5165
5454
|
);
|
|
5166
|
-
const destination =
|
|
5167
|
-
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))
|
|
5168
5457
|
throw new Error(
|
|
5169
5458
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
5170
5459
|
);
|
|
5171
|
-
const infoFile = product ?
|
|
5460
|
+
const infoFile = product ? path36.resolve(
|
|
5172
5461
|
product.ref.project.projectDir,
|
|
5173
5462
|
product.settings("INFOPLIST_FILE")
|
|
5174
5463
|
) : null;
|
|
5175
5464
|
if (infoFile) xcconfigs.add(infoFile);
|
|
5176
5465
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
5177
|
-
const bundlePath = prefix + destination.split(
|
|
5466
|
+
const bundlePath = prefix + destination.split(path36.sep).join("/");
|
|
5178
5467
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
5179
5468
|
throw new Error(
|
|
5180
5469
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -5185,21 +5474,30 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5185
5474
|
resources: product.module.resources,
|
|
5186
5475
|
infoPlist: plist2.build(
|
|
5187
5476
|
expandValue(
|
|
5188
|
-
plist2.parse(
|
|
5477
|
+
plist2.parse(fs17.readFileSync(infoFile, "utf8")),
|
|
5189
5478
|
product.settings
|
|
5190
5479
|
)
|
|
5191
5480
|
)
|
|
5192
5481
|
} : {
|
|
5193
|
-
resources:
|
|
5482
|
+
resources: fs17.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path36.join(entry.parentPath, entry.name)).sort(),
|
|
5194
5483
|
sourceRoot: input2
|
|
5195
5484
|
}
|
|
5196
5485
|
});
|
|
5197
5486
|
}
|
|
5198
5487
|
}
|
|
5199
5488
|
}
|
|
5200
|
-
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;
|
|
5201
5499
|
const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
|
|
5202
|
-
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(
|
|
5500
|
+
const sourceInfo = infoPlistFile && !infoPlistPending ? plist2.parse(fs17.readFileSync(infoPlistFile, "utf8")) : {};
|
|
5203
5501
|
if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
|
|
5204
5502
|
throw new Error(`${module.name} Info.plist must contain a dictionary`);
|
|
5205
5503
|
}
|
|
@@ -5245,7 +5543,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5245
5543
|
};
|
|
5246
5544
|
}
|
|
5247
5545
|
const localPackageDirs = [
|
|
5248
|
-
...listed.filter((reference) =>
|
|
5546
|
+
...listed.filter((reference) => fs17.existsSync(path36.join(reference, "Package.swift"))),
|
|
5249
5547
|
...projects.flatMap(
|
|
5250
5548
|
(project) => Object.entries(project.objects).flatMap(([id, entry]) => {
|
|
5251
5549
|
if (!isDict(entry)) return [];
|
|
@@ -5255,19 +5553,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5255
5553
|
const packages = [];
|
|
5256
5554
|
while (pending.length > 0) {
|
|
5257
5555
|
const dir = pending.pop();
|
|
5258
|
-
if (
|
|
5556
|
+
if (fs17.existsSync(path36.join(dir, "Package.swift"))) {
|
|
5259
5557
|
packages.push(dir);
|
|
5260
5558
|
continue;
|
|
5261
5559
|
}
|
|
5262
5560
|
if (!isDirectory(dir)) continue;
|
|
5263
|
-
for (const child of
|
|
5561
|
+
for (const child of fs17.readdirSync(dir, { withFileTypes: true }))
|
|
5264
5562
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
5265
|
-
pending.push(
|
|
5563
|
+
pending.push(path36.join(dir, child.name));
|
|
5266
5564
|
}
|
|
5267
5565
|
return packages;
|
|
5268
5566
|
}
|
|
5269
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
5270
|
-
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] : [];
|
|
5271
5569
|
})
|
|
5272
5570
|
)
|
|
5273
5571
|
];
|
|
@@ -5297,7 +5595,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5297
5595
|
if ((flag === "-framework" || flag === "-weak_framework") && name2)
|
|
5298
5596
|
sdkFrameworks.add(name2);
|
|
5299
5597
|
});
|
|
5300
|
-
const absolute = (raw) =>
|
|
5598
|
+
const absolute = (raw) => path36.resolve(ref.project.projectDir, expand(raw, settings2));
|
|
5301
5599
|
const requested = options.nativeModules;
|
|
5302
5600
|
const includeBinary = (name2, dir) => {
|
|
5303
5601
|
if (!requested || nativeTargets.has(ref) || requested.includes(name2) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module2) => requested.includes(module2)))
|
|
@@ -5309,14 +5607,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5309
5607
|
for (const directory of expandSearchPath(absolute(raw), searchRules)) {
|
|
5310
5608
|
if (frameworkSearchDirectories.has(directory)) continue;
|
|
5311
5609
|
frameworkSearchDirectories.add(directory);
|
|
5312
|
-
if (!
|
|
5610
|
+
if (!fs17.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
|
|
5313
5611
|
continue;
|
|
5314
|
-
for (const entry of
|
|
5612
|
+
for (const entry of fs17.readdirSync(directory, { withFileTypes: true })) {
|
|
5315
5613
|
const name2 = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
5316
5614
|
if (!name2 || byProduct.has(entry.name) || searchedFrameworks.has(name2))
|
|
5317
5615
|
continue;
|
|
5318
|
-
const file =
|
|
5319
|
-
if (
|
|
5616
|
+
const file = path36.join(directory, entry.name);
|
|
5617
|
+
if (fs17.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
5320
5618
|
searchedFrameworks.set(name2, file);
|
|
5321
5619
|
}
|
|
5322
5620
|
}
|
|
@@ -5324,9 +5622,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5324
5622
|
}
|
|
5325
5623
|
for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
5326
5624
|
const dir = absolute(raw);
|
|
5327
|
-
const modulemap =
|
|
5328
|
-
if (!
|
|
5329
|
-
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"));
|
|
5330
5628
|
if (name2 && !binaryFrameworks.has(name2)) includeBinary(name2, dir);
|
|
5331
5629
|
}
|
|
5332
5630
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -5335,7 +5633,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5335
5633
|
const inputs = list(phase.inputPaths).map(absolute);
|
|
5336
5634
|
for (const raw of list(phase.inputFileListPaths)) {
|
|
5337
5635
|
const file = absolute(raw);
|
|
5338
|
-
if (!
|
|
5636
|
+
if (!fs17.existsSync(file)) continue;
|
|
5339
5637
|
xcconfigs.add(file);
|
|
5340
5638
|
inputs.push(...fileListEntries(file, absolute));
|
|
5341
5639
|
}
|
|
@@ -5357,6 +5655,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5357
5655
|
productPlatforms.set(ref2, productPlatforms.get(ref2) === true || builds);
|
|
5358
5656
|
return builds ? [ref2] : [];
|
|
5359
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
|
+
}
|
|
5360
5672
|
const referencedProducts = [
|
|
5361
5673
|
...list(target.dependencies).flatMap(productRef),
|
|
5362
5674
|
...list(target.buildPhases).flatMap((id) => {
|
|
@@ -5365,6 +5677,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5365
5677
|
})
|
|
5366
5678
|
];
|
|
5367
5679
|
const productDependencies = [
|
|
5680
|
+
...productAttributes.keys(),
|
|
5368
5681
|
...list(target.packageProductDependencies).filter(
|
|
5369
5682
|
(id) => productPlatforms.get(id) !== false
|
|
5370
5683
|
),
|
|
@@ -5382,9 +5695,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5382
5695
|
const reference = project.object(str(dependency.package));
|
|
5383
5696
|
const linked = {
|
|
5384
5697
|
product,
|
|
5698
|
+
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
5385
5699
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
5386
5700
|
kind: "local",
|
|
5387
|
-
dir:
|
|
5701
|
+
dir: path36.resolve(
|
|
5388
5702
|
project.projectDir,
|
|
5389
5703
|
str(reference.relativePath) ?? ""
|
|
5390
5704
|
)
|
|
@@ -5418,10 +5732,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5418
5732
|
continue;
|
|
5419
5733
|
}
|
|
5420
5734
|
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
5421
|
-
byProduct.has(
|
|
5735
|
+
byProduct.has(path36.basename(rawPath)))
|
|
5422
5736
|
continue;
|
|
5423
5737
|
const resolved = fileId ? project.resolvePath(fileId) : null;
|
|
5424
|
-
if (fileId && resolved !== null && !
|
|
5738
|
+
if (fileId && resolved !== null && !fs17.existsSync(resolved))
|
|
5425
5739
|
throw new Error(
|
|
5426
5740
|
`${str(target.name) ?? "target"}: linked framework ${name2} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
|
|
5427
5741
|
);
|
|
@@ -5444,7 +5758,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5444
5758
|
({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
|
|
5445
5759
|
);
|
|
5446
5760
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
5447
|
-
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();
|
|
5448
5762
|
if (packageResolved.length === 0) {
|
|
5449
5763
|
const requirements = remotePackageRequirements(projects);
|
|
5450
5764
|
if (requirements.length > 0) {
|
|
@@ -5455,6 +5769,31 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5455
5769
|
const used = order.map((ref) => ref.project);
|
|
5456
5770
|
return {
|
|
5457
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
|
+
},
|
|
5458
5797
|
moduleMapSources: Object.fromEntries(
|
|
5459
5798
|
builtTargets.flatMap(({ module: module2 }) => {
|
|
5460
5799
|
const compatibility = module2.swift?.compatibility;
|
|
@@ -5470,19 +5809,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5470
5809
|
} : {},
|
|
5471
5810
|
rootDir: commonAncestor(
|
|
5472
5811
|
[
|
|
5473
|
-
workspace ?
|
|
5812
|
+
workspace ? path36.dirname(workspace) : app.project.projectDir,
|
|
5474
5813
|
...used.map((project) => project.projectDir),
|
|
5475
5814
|
...localPackageDirs,
|
|
5476
5815
|
...linkedProducts.flatMap(
|
|
5477
|
-
({ source }) => source.kind === "local" &&
|
|
5816
|
+
({ source }) => source.kind === "local" && fs17.existsSync(source.dir) ? [source.dir] : []
|
|
5478
5817
|
),
|
|
5479
5818
|
...new Set(podSourceDirs)
|
|
5480
|
-
].map((dir) =>
|
|
5819
|
+
].map((dir) => fs17.realpathSync(dir))
|
|
5481
5820
|
),
|
|
5482
5821
|
projectFiles: [
|
|
5483
5822
|
.../* @__PURE__ */ new Set([
|
|
5484
5823
|
...used.map((project) => project.projectFile),
|
|
5485
5824
|
...xcconfigs,
|
|
5825
|
+
...entitlementsFile ? [entitlementsFile] : [],
|
|
5486
5826
|
...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
|
|
5487
5827
|
])
|
|
5488
5828
|
].sort(),
|
|
@@ -5490,13 +5830,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
|
|
|
5490
5830
|
appIconName: settings("ASSETCATALOG_COMPILER_APPICON_NAME"),
|
|
5491
5831
|
infoPlist: infoPlistPending ? null : plist2.build(info),
|
|
5492
5832
|
infoPlistFile,
|
|
5833
|
+
...keychainAccessGroups === void 0 ? {} : { keychainAccessGroups },
|
|
5493
5834
|
postBundleScripts,
|
|
5494
5835
|
developmentRegion: str(app.project.project.developmentRegion) ?? "en",
|
|
5495
5836
|
frameworks,
|
|
5496
5837
|
resourceProducts,
|
|
5497
5838
|
linkedProducts,
|
|
5498
5839
|
localPackageDirs: [
|
|
5499
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
5840
|
+
...new Set(localPackageDirs.map((dir) => fs17.realpathSync(dir)))
|
|
5500
5841
|
].sort(),
|
|
5501
5842
|
binaryFrameworks: [...binaryFrameworks].map(([name2, file]) => ({ name: name2, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
5502
5843
|
sdkFrameworks: [...sdkFrameworks].filter(
|
|
@@ -5575,14 +5916,14 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5575
5916
|
const querySchemes = dictionary.LSApplicationQueriesSchemes;
|
|
5576
5917
|
const urlQuerySchemes = Array.isArray(querySchemes) ? querySchemes : [];
|
|
5577
5918
|
const intentIds = dictionary.OneAppIntentIdentifiers;
|
|
5578
|
-
const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((
|
|
5919
|
+
const appIntentIdentifiers = Array.isArray(intentIds) && intentIds.every((v5) => typeof v5 === "string") ? intentIds : [];
|
|
5579
5920
|
const backgroundIds = dictionary.BGTaskSchedulerPermittedIdentifiers;
|
|
5580
|
-
const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((
|
|
5921
|
+
const backgroundTaskIdentifiers = Array.isArray(backgroundIds) && backgroundIds.every((v5) => typeof v5 === "string") ? backgroundIds : [];
|
|
5581
5922
|
const declaredModes = dictionary.UIBackgroundModes;
|
|
5582
|
-
const backgroundModes = Array.isArray(declaredModes) && declaredModes.every((
|
|
5583
|
-
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 : [];
|
|
5584
5925
|
const ipadSupportedInterfaceOrientations = Array.isArray(dictionary["UISupportedInterfaceOrientations~ipad"]) && dictionary["UISupportedInterfaceOrientations~ipad"].every(
|
|
5585
|
-
(
|
|
5926
|
+
(v5) => typeof v5 === "string"
|
|
5586
5927
|
) ? dictionary["UISupportedInterfaceOrientations~ipad"] : [];
|
|
5587
5928
|
const defaultScreenOrientationMask = nonEmptyString2(
|
|
5588
5929
|
dictionary.EXDefaultScreenOrientationMask
|
|
@@ -5591,9 +5932,10 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5591
5932
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
|
|
5592
5933
|
const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
|
|
5593
5934
|
const rootModuleName = readRootModuleName(
|
|
5594
|
-
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"))
|
|
5595
5936
|
);
|
|
5596
5937
|
return stampNativeBuildSdk({
|
|
5938
|
+
...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
|
|
5597
5939
|
applicationName,
|
|
5598
5940
|
...applicationDisplayName ? { applicationDisplayName } : {},
|
|
5599
5941
|
...rootModuleName ? { rootModuleName } : {},
|
|
@@ -5612,7 +5954,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5612
5954
|
googleSignIn: readGoogleSignInConfiguration(
|
|
5613
5955
|
dictionary,
|
|
5614
5956
|
Object.fromEntries(
|
|
5615
|
-
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"))])
|
|
5616
5958
|
)
|
|
5617
5959
|
),
|
|
5618
5960
|
supportedInterfaceOrientations,
|
|
@@ -5621,11 +5963,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
5621
5963
|
alternateIconNames: [...alternateIconNames],
|
|
5622
5964
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
5623
5965
|
app.resources,
|
|
5624
|
-
(file) =>
|
|
5966
|
+
(file) => fs18.readFileSync(file, "utf8"),
|
|
5625
5967
|
(file) => {
|
|
5626
|
-
const extension =
|
|
5968
|
+
const extension = path37.extname(file).toLowerCase();
|
|
5627
5969
|
const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
5628
|
-
return `data:${contentType};base64,${
|
|
5970
|
+
return `data:${contentType};base64,${fs18.readFileSync(file).toString("base64")}`;
|
|
5629
5971
|
},
|
|
5630
5972
|
icons,
|
|
5631
5973
|
app.appIconName,
|
|
@@ -5654,23 +5996,29 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
5654
5996
|
const read = selectNativeAppIdentityReader(platform, {
|
|
5655
5997
|
android: () => null,
|
|
5656
5998
|
ios: () => {
|
|
5657
|
-
const nested =
|
|
5658
|
-
const iosRoot =
|
|
5999
|
+
const nested = path37.join(projectRoot, "ios");
|
|
6000
|
+
const iosRoot = fs18.existsSync(nested) ? nested : projectRoot;
|
|
5659
6001
|
const prefix = iosRoot === nested ? "ios/" : "";
|
|
5660
6002
|
const files = {};
|
|
5661
|
-
for (const entry of
|
|
6003
|
+
for (const entry of fs18.readdirSync(iosRoot, { withFileTypes: true })) {
|
|
5662
6004
|
if (entry.name === "Pods") continue;
|
|
5663
6005
|
if (entry.isDirectory()) {
|
|
5664
|
-
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
|
+
];
|
|
5665
6013
|
for (const name2 of names) {
|
|
5666
6014
|
const relative2 = `${prefix}${entry.name}/${name2}`;
|
|
5667
|
-
const file =
|
|
5668
|
-
if (
|
|
6015
|
+
const file = path37.join(projectRoot, relative2);
|
|
6016
|
+
if (fs18.existsSync(file)) files[relative2] = fs18.readFileSync(file, "utf8");
|
|
5669
6017
|
}
|
|
5670
|
-
} else if (/AppDelegate\.(?:swift|mm|m)$/.test(entry.name)) {
|
|
6018
|
+
} else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
|
|
5671
6019
|
const relative2 = `${prefix}${entry.name}`;
|
|
5672
|
-
const file =
|
|
5673
|
-
if (
|
|
6020
|
+
const file = path37.join(projectRoot, relative2);
|
|
6021
|
+
if (fs18.existsSync(file)) files[relative2] = fs18.readFileSync(file, "utf8");
|
|
5674
6022
|
}
|
|
5675
6023
|
}
|
|
5676
6024
|
const identity = extractNativeAppIdentityFromFiles(
|
|
@@ -5687,41 +6035,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
|
|
|
5687
6035
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
5688
6036
|
const files = {};
|
|
5689
6037
|
if (androidMergedManifest) {
|
|
5690
|
-
const file =
|
|
5691
|
-
if (!
|
|
5692
|
-
files[androidMergedManifest] =
|
|
6038
|
+
const file = path37.resolve(projectRoot, androidMergedManifest);
|
|
6039
|
+
if (!fs18.existsSync(file)) return null;
|
|
6040
|
+
files[androidMergedManifest] = fs18.readFileSync(file, "utf8");
|
|
5693
6041
|
} else {
|
|
5694
|
-
const androidRoot =
|
|
5695
|
-
if (!
|
|
6042
|
+
const androidRoot = path37.join(projectRoot, "android");
|
|
6043
|
+
if (!fs18.existsSync(androidRoot)) return null;
|
|
5696
6044
|
const collect = (directory) => {
|
|
5697
|
-
for (const entry of
|
|
5698
|
-
const file =
|
|
6045
|
+
for (const entry of fs18.readdirSync(directory, { withFileTypes: true })) {
|
|
6046
|
+
const file = path37.join(directory, entry.name);
|
|
5699
6047
|
if (entry.isDirectory()) collect(file);
|
|
5700
6048
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
5701
|
-
files[
|
|
6049
|
+
files[path37.relative(projectRoot, file).split(path37.sep).join("/")] = fs18.readFileSync(file, "utf8");
|
|
5702
6050
|
}
|
|
5703
6051
|
};
|
|
5704
|
-
for (const module of
|
|
6052
|
+
for (const module of fs18.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
5705
6053
|
if (!module.isDirectory()) continue;
|
|
5706
|
-
const outputs =
|
|
6054
|
+
const outputs = path37.join(
|
|
5707
6055
|
androidRoot,
|
|
5708
6056
|
module.name,
|
|
5709
6057
|
"build/intermediates/merged_manifests"
|
|
5710
6058
|
);
|
|
5711
|
-
if (
|
|
6059
|
+
if (fs18.existsSync(outputs)) collect(outputs);
|
|
5712
6060
|
}
|
|
5713
6061
|
}
|
|
5714
6062
|
for (const manifest of Object.keys(files)) {
|
|
5715
6063
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
5716
6064
|
if (!resourceDirectory) continue;
|
|
5717
|
-
const absolute =
|
|
5718
|
-
if (!
|
|
5719
|
-
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 })) {
|
|
5720
6068
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
5721
|
-
for (const resource of
|
|
6069
|
+
for (const resource of fs18.readdirSync(path37.join(absolute, entry.name))) {
|
|
5722
6070
|
if (!resource.endsWith(".xml")) continue;
|
|
5723
6071
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
5724
|
-
files[file] =
|
|
6072
|
+
files[file] = fs18.readFileSync(path37.resolve(projectRoot, file), "utf8");
|
|
5725
6073
|
}
|
|
5726
6074
|
}
|
|
5727
6075
|
}
|
|
@@ -5738,7 +6086,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5738
6086
|
const app = readIosAppTarget(projectRoot, iosTarget, environment);
|
|
5739
6087
|
if (!app) return null;
|
|
5740
6088
|
const identity = readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist);
|
|
5741
|
-
const projectManifestPath =
|
|
6089
|
+
const projectManifestPath = path37.join(projectRoot, "package.json");
|
|
5742
6090
|
const projectRequire = createRequire(projectManifestPath);
|
|
5743
6091
|
let reanimatedManifestPath;
|
|
5744
6092
|
try {
|
|
@@ -5752,22 +6100,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
5752
6100
|
throw error;
|
|
5753
6101
|
}
|
|
5754
6102
|
const installedManifest = JSON.parse(
|
|
5755
|
-
|
|
6103
|
+
fs18.readFileSync(reanimatedManifestPath, "utf8")
|
|
5756
6104
|
);
|
|
5757
6105
|
const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
5758
6106
|
if (!installedVersion) throw new Error("Reanimated package version is malformed");
|
|
5759
6107
|
if (Number.parseInt(installedVersion, 10) < 4) return identity;
|
|
5760
6108
|
const defaults = JSON.parse(
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
6109
|
+
fs18.readFileSync(
|
|
6110
|
+
path37.join(
|
|
6111
|
+
path37.dirname(reanimatedManifestPath),
|
|
5764
6112
|
"src/featureFlags/staticFlags.json"
|
|
5765
6113
|
),
|
|
5766
6114
|
"utf8"
|
|
5767
6115
|
)
|
|
5768
6116
|
);
|
|
5769
6117
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
5770
|
-
const manifest = JSON.parse(
|
|
6118
|
+
const manifest = JSON.parse(fs18.readFileSync(projectManifestPath, "utf8"));
|
|
5771
6119
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
5772
6120
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
5773
6121
|
if (overrides !== void 0 && !isRecord(overrides)) {
|