peachsim 0.1.2679 → 0.1.2681
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/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 +2 -2
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +5 -5
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +3 -3
- package/dist-lib/bundle-channel.cjs +1638 -983
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +3 -3
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +3 -3
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +2 -2
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +7 -7
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +5 -5
- package/dist-lib/detox/index.cjs +2 -2
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/esm-chunks/{acorn-KT4EYLSJ.mjs → acorn-PR2XQSSU.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-UOT25QCP.mjs → chunk-4FLAV4CH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4ZQP7VPQ.mjs → chunk-7E6FTDFH.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-FA5V3ZBF.mjs → chunk-AE55UVNN.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4MQNNSXS.mjs → chunk-AN2MS7YE.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-7VK6K2OI.mjs → chunk-BMLK7CSL.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DPFS4TZQ.mjs → chunk-COZNDKTJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-JK6VGS54.mjs → chunk-EULMEAZP.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-FLEDVCBF.mjs → chunk-FETYD3YY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AIMGU6I4.mjs → chunk-H6ZWWX3Q.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-BMPYVWFP.mjs → chunk-HHGF6SPD.mjs} +8 -7
- package/dist-lib/esm-chunks/{chunk-WSX6WDGU.mjs → chunk-I6ET6AKV.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YGGXAYBE.mjs → chunk-I7QX2CR7.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-DGARJVZC.mjs → chunk-J6HBVHOS.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-I77TXXX6.mjs → chunk-KTGBQAWI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-XA22MMUJ.mjs → chunk-KZ6UAKVY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-WLJU7OX2.mjs → chunk-LN55QJTY.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4X7TCSFW.mjs → chunk-MCESDV7T.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BHQ3JLKY.mjs → chunk-MIB25WM5.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-HSSAEZKK.mjs → chunk-NET7R6JQ.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-M4IBIRSF.mjs → chunk-QZIWFRDI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4T5622XC.mjs → chunk-RICNI6K7.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-TJ5Y26RK.mjs → chunk-VRIDWK4F.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-4QDKSAM6.mjs → chunk-YHFSPPEY.mjs} +16 -16
- package/dist-lib/esm-chunks/{chunk-22IVJ37E.mjs → chunk-ZIU5CFK4.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-NZ5LDDDY.mjs → metro-layout-parser-IRQ5U7LT.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-YUCWJYTO.mjs → swift-package-prebuilt-I3H6PNXA.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-AJD2DGDE.mjs → swift-sdk-app-module-GVKIKJFL.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-7SWUP4QR.mjs → swift-sdk-image-SQUIDGQL.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-RISXYQ6A.mjs → swift-sdk-image-producer-HTOOFVQH.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +5923 -1534
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +8 -8
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +832 -696
- package/dist-lib/host/fetch-proxy-handler.cjs +86 -83
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +2 -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 +1 -1
- package/dist-lib/kotlin-host.cjs +1 -1
- package/dist-lib/menu.cjs +1 -1
- package/dist-lib/menu.mjs +3 -3
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +3 -3
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +4 -4
- package/dist-lib/native-app-identity-project.cjs +410 -304
- package/dist-lib/native-app-identity-project.mjs +418 -312
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +6 -6
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +3 -3
- package/dist-lib/pdfium-raster.cjs +1 -1
- package/dist-lib/pdfium-raster.mjs +2 -2
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +3 -3
- package/dist-lib/profiles.cjs +1 -1
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +87 -85
- package/dist-lib/public-origins-lib.json +84 -72
- package/dist-lib/react-native-host-modules.cjs +1 -1
- package/dist-lib/react-native-host-modules.mjs +2 -2
- 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 +8 -8
- package/dist-lib/skills.cjs +873 -736
- package/dist-lib/swift-compile.cjs +5 -4
- package/dist-lib/swift-compile.mjs +12 -12
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +3 -3
- package/dist-lib/swift-submit.cjs +1 -1
- package/dist-lib/swift-submit.mjs +6 -6
- package/dist-lib/swift-svg-raster.cjs +1 -1
- package/dist-lib/swift-svg-raster.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +1 -1
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
- package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
- package/dist-lib/vendor/acorn.cjs +1 -1
- package/dist-lib/vendor/magic-string.cjs +1 -1
- package/dist-lib/vendor/stream-json.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
- package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
- package/dist-lib/vendor/sucrase.cjs +1 -1
- package/dist-lib/vendor/terser.cjs +1 -1
- package/dist-lib/vendor/valibot.cjs +1 -1
- package/dist-lib/vendor/ws.cjs +1 -1
- package/dist-lib/vendor/zod.cjs +1 -1
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +3 -3
- package/dist-types/packages/peach-engine/src/engine/native-image-pipeline.d.ts +3 -1
- package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +1 -1
- package/dist-types/packages/peach-engine/src/render-worker/webgpu-frame-transaction.d.ts +2 -1
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/expo-swift-bundle.ts +2 -7
- package/src/expo-swift-host.ts +93 -34
- package/src/expoSwiftContract.ts +9 -0
- package/src/native-bundles.ts +6 -0
- package/src/nitro-bundle.ts +5 -2
- package/src/swift-compile.ts +1 -1
- package/src/swift-host.ts +16 -0
- package/src/swift-sdk-surface.ts +3 -4
- package/src/swift-xcframework.ts +13 -7
- package/src/turbo-codegen-intake.ts +4 -1
- package/src/turbo-source.ts +61 -43
- package/src/xcode-project.ts +57 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! peach v0.1.
|
|
1
|
+
/*! peach v0.1.2681 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
|
|
2
2
|
let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
|
|
3
3
|
"use strict";
|
|
4
4
|
var __create = Object.create;
|
|
@@ -2706,7 +2706,7 @@ var init_process_liveness = __esm({
|
|
|
2706
2706
|
var runtime_companion_default;
|
|
2707
2707
|
var init_runtime_companion = __esm({
|
|
2708
2708
|
"runtime-companion.json"() {
|
|
2709
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
2709
|
+
runtime_companion_default = { abi: 1, sha256: "daf162d4a4e16da33424ba3f1895db477c3561a9d74f1f77b381d8f6af391475", file: "node/cli-daf162d4a4e16da33424ba3f1895db477c3561a9d74f1f77b381d8f6af391475.cjs" };
|
|
2710
2710
|
}
|
|
2711
2711
|
});
|
|
2712
2712
|
|
|
@@ -6175,7 +6175,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
6175
6175
|
|
|
6176
6176
|
// src/swift-compiler-digest.ts
|
|
6177
6177
|
function swiftArchiveCompilerDigestValue() {
|
|
6178
|
-
return true ? "
|
|
6178
|
+
return true ? "7ec504e1047ea0f31b14e25b8958c42fd1e55cb9c121db3f05e4dead6ef226eb" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
6179
6179
|
}
|
|
6180
6180
|
var import_node_crypto10, import_node_fs25, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
6181
6181
|
var init_swift_compiler_digest = __esm({
|
|
@@ -6320,13 +6320,13 @@ var init_swift_standin_digest = __esm({
|
|
|
6320
6320
|
];
|
|
6321
6321
|
RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
6322
6322
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
|
|
6323
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
6323
|
+
STANDIN_SOURCE_DIGEST = true ? "cdf4a04b8b51e0280fcba42b7e2b6356a9ea69d0c483e1a08dc29a0dafbc3207" : standinSourceDigest();
|
|
6324
6324
|
}
|
|
6325
6325
|
});
|
|
6326
6326
|
|
|
6327
6327
|
// src/expo-native-compiler-digest.ts
|
|
6328
6328
|
function expoNativeCompilerDigestValue() {
|
|
6329
|
-
return true ? "
|
|
6329
|
+
return true ? "dd69e490ecc79ee83e8cba98c4532818a62e9b0e93c21113e2d6c21ec60d8eee" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
6330
6330
|
}
|
|
6331
6331
|
var import_node_crypto12;
|
|
6332
6332
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -41556,7 +41556,8 @@ function swiftBuildJobs() {
|
|
|
41556
41556
|
const cores = Math.min(admittedCores, parallelism);
|
|
41557
41557
|
if (process.platform === "darwin") return cores;
|
|
41558
41558
|
const memory = process.env.TM_EXEC_ADMITTED === "1" && process.env.LINUX_BUILD_SCOPE ? Number(process.env.TM_EXEC_LINUX_MEMORY_MAX) : NaN;
|
|
41559
|
-
const
|
|
41559
|
+
const effectiveMemory = Number.isSafeInteger(memory) && memory > 0 ? memory : import_node_os12.default.totalmem();
|
|
41560
|
+
const memoryJobs = Math.max(1, Math.floor(effectiveMemory / (2 * 1024 ** 3)));
|
|
41560
41561
|
return Math.min(cores, memoryJobs);
|
|
41561
41562
|
}
|
|
41562
41563
|
function swiftDistributionAt(root) {
|
|
@@ -49031,7 +49032,7 @@ async function runCompiler(command, args, options2, stream = false, quiet) {
|
|
|
49031
49032
|
}
|
|
49032
49033
|
}
|
|
49033
49034
|
function swiftCompilerJobs() {
|
|
49034
|
-
return Math.min(
|
|
49035
|
+
return Math.min(64, swiftBuildJobs(), Math.max(1, Math.floor(import_node_os18.default.totalmem() / 2 ** 31)));
|
|
49035
49036
|
}
|
|
49036
49037
|
function swiftCompilerBaseEnv(toolchainBin, sourceEnv, includePeachHome = false) {
|
|
49037
49038
|
const env = {};
|
|
@@ -54665,7 +54666,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
54665
54666
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
54666
54667
|
MULTI_MANIFEST_VERSION = 76;
|
|
54667
54668
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
54668
|
-
compilerSourceDigest = true ? "
|
|
54669
|
+
compilerSourceDigest = true ? "229f789297c5cb8e33a042e23ad3c1df20450a712a02dd0b50d2e78bc8ed3de6" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
54669
54670
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
54670
54671
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
54671
54672
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -74563,7 +74564,7 @@ var init_provenance = __esm({
|
|
|
74563
74564
|
import_node_crypto56 = require("node:crypto");
|
|
74564
74565
|
import_node_fs96 = require("node:fs");
|
|
74565
74566
|
import_node_path99 = require("node:path");
|
|
74566
|
-
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"692791414734a0fe5949c1d2638941d5de882b8737675deae2e3a49512f2a126","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"
|
|
74567
|
+
swiftCoverageProvenance = true ? JSON.parse('{"swift-coverage/indexdump.ts":"0d82d8eeb96bf377f409ea7e33274c341a710c0e071f6b6e17571a23d8d92412","swift-coverage/indexing.ts":"633ccf19eec1f382a8847d0ee1dca42a2792a3c60aafd43622ed5152b09b8272","swift-coverage/types.ts":"bd8fae54ea6c53e110cd8a5d7b57c1d532dd0166e09fdaea63c4f270c3780dd1","swift-coverage/source.ts":"c151758a9f67631bc61473c375df0dc017da6902a34533b2cf4fc4fd7d19b6ee","swift-coverage/package.ts":"1f0068be7461fa7c5a7a891faf318f305cbed2e94c19667ba76627f7e5be260b","swift-coverage/xcode.ts":"d6a3228567a46c6d5280895383093889d9b868958a117881061bdd74729a225f","swift-coverage/xcode-assets.ts":"d98d6294b359528f7733b26db6f80f554782354faa235605f9562be4ad98b8a3","swift-coverage/xcode-asset-symbols.ts":"1b2a67733bc9d139b351466270205452a6172140bc25080d72619e2952c44671","swift-coverage/xcode-bridging.ts":"33184be8c5daf6646aa5a1276a4e15531f1be27b7c26f56550e0fbb1fc678a11","swift-coverage/xcode-packages.ts":"5c83f56357d880243ab485b260d23abd0094583ffa2287dac6e9e7eb18c3673d","swift-coverage/xcode-strings.ts":"facdbeb9de6bb12da4ab4954553edfaadd0e486f1181443138be70c3d8396236","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"523fdfffc0cff95c8df7beeca437622a07d4fd666f0bb22b0ff67d14c42a7b10","swift-package.ts":"05c6cf101fbc944f6684a70db0a9c5aede846b2f0482a6b4a5a0abed737d4658","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"692791414734a0fe5949c1d2638941d5de882b8737675deae2e3a49512f2a126","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"c72b724fc497e4cf603c355f86eb3c07c929ad299758cffbc6ff88ed241654c6","xcode-project.ts":"d140088a94d032e28788e18bf11499965e0c626255fd904538764ededcf1d751","xcode-target-members.ts":"2379e6d411c5d63fa65ddc24c4e4fc8bfcd001b5be109b694c848fe62908db86","xcode-json-project.ts":"df6d6db28e0c8cfdf1f480e1e32d35f12c9cf1936642d5dda923889fb18a8fd6","openstep-plist.ts":"da11f86885ef1e25979ad989f332195c113c4b7a43f108e8d36646973430b81b"}') : swiftCoverageSourceDigests((0, import_node_path99.join)(__sootsim_import_meta_dirname, ".."));
|
|
74567
74568
|
}
|
|
74568
74569
|
});
|
|
74569
74570
|
|
|
@@ -75693,6 +75694,92 @@ var init_xcode_assets = __esm({
|
|
|
75693
75694
|
}
|
|
75694
75695
|
});
|
|
75695
75696
|
|
|
75697
|
+
// src/swift-xcframework.ts
|
|
75698
|
+
function simulatorNativeLibrary(dir) {
|
|
75699
|
+
if (dir.endsWith(".framework")) {
|
|
75700
|
+
const name3 = import_node_path102.default.basename(dir, ".framework");
|
|
75701
|
+
return {
|
|
75702
|
+
name: name3,
|
|
75703
|
+
file: import_node_path102.default.join(dir, name3),
|
|
75704
|
+
slice: import_node_path102.default.dirname(dir),
|
|
75705
|
+
kind: "framework"
|
|
75706
|
+
};
|
|
75707
|
+
}
|
|
75708
|
+
if (!dir.endsWith(".xcframework")) return null;
|
|
75709
|
+
const info = parsePlistBytes(import_node_fs99.default.readFileSync(import_node_path102.default.join(dir, "Info.plist")));
|
|
75710
|
+
if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
|
|
75711
|
+
throw new Error(`${dir}: invalid XCFramework library declarations`);
|
|
75712
|
+
const matches = [];
|
|
75713
|
+
for (const entry of info.AvailableLibraries) {
|
|
75714
|
+
if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
|
|
75715
|
+
if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
|
|
75716
|
+
continue;
|
|
75717
|
+
if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
|
|
75718
|
+
throw new Error(`${dir}: invalid simulator library paths`);
|
|
75719
|
+
const archive = /\.a$/.test(entry.LibraryPath);
|
|
75720
|
+
const framework = /\.framework$/.test(entry.LibraryPath);
|
|
75721
|
+
if (!archive && !framework) continue;
|
|
75722
|
+
const slice = import_node_path102.default.resolve(dir, entry.LibraryIdentifier);
|
|
75723
|
+
const bundle = import_node_path102.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
|
|
75724
|
+
const bundleRelative = import_node_path102.default.relative(dir, bundle);
|
|
75725
|
+
if (bundleRelative.startsWith("..") || import_node_path102.default.isAbsolute(bundleRelative))
|
|
75726
|
+
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
75727
|
+
let name3 = entry.LibraryPath;
|
|
75728
|
+
let file = bundle;
|
|
75729
|
+
if (framework) {
|
|
75730
|
+
name3 = import_node_path102.default.basename(bundle, ".framework");
|
|
75731
|
+
file = import_node_path102.default.join(bundle, name3);
|
|
75732
|
+
}
|
|
75733
|
+
const relative6 = import_node_path102.default.relative(dir, file);
|
|
75734
|
+
if (relative6.startsWith("..") || import_node_path102.default.isAbsolute(relative6))
|
|
75735
|
+
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
75736
|
+
if (framework) {
|
|
75737
|
+
matches.push({ name: name3, file, slice, kind: "framework" });
|
|
75738
|
+
continue;
|
|
75739
|
+
}
|
|
75740
|
+
const headers = typeof entry.HeadersPath === "string" ? import_node_path102.default.resolve(slice, entry.HeadersPath) : void 0;
|
|
75741
|
+
if (headers && relativeInside(slice, headers) === null)
|
|
75742
|
+
throw new Error(`${dir}: headers escape their XCFramework slice`);
|
|
75743
|
+
matches.push({ name: name3, file, slice, kind: "archive", headers });
|
|
75744
|
+
}
|
|
75745
|
+
if (matches.length === 0) return null;
|
|
75746
|
+
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
75747
|
+
return matches[0];
|
|
75748
|
+
}
|
|
75749
|
+
function isDynamicLibrary2(file) {
|
|
75750
|
+
const fd = import_node_fs99.default.openSync(file, "r");
|
|
75751
|
+
try {
|
|
75752
|
+
const read2 = (offset) => {
|
|
75753
|
+
const bytes = Buffer.alloc(16);
|
|
75754
|
+
import_node_fs99.default.readSync(fd, bytes, 0, 16, offset);
|
|
75755
|
+
return bytes;
|
|
75756
|
+
};
|
|
75757
|
+
let header = read2(0);
|
|
75758
|
+
const universal = header.readUInt32BE(0);
|
|
75759
|
+
if (universal === 3405691582 || universal === 3405691583) {
|
|
75760
|
+
const arch = read2(8);
|
|
75761
|
+
header = read2(
|
|
75762
|
+
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
75763
|
+
);
|
|
75764
|
+
}
|
|
75765
|
+
const magic = header.readUInt32LE(0);
|
|
75766
|
+
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
75767
|
+
} finally {
|
|
75768
|
+
import_node_fs99.default.closeSync(fd);
|
|
75769
|
+
}
|
|
75770
|
+
}
|
|
75771
|
+
var import_node_fs99, import_node_path102;
|
|
75772
|
+
var init_swift_xcframework = __esm({
|
|
75773
|
+
"src/swift-xcframework.ts"() {
|
|
75774
|
+
"use strict";
|
|
75775
|
+
import_node_fs99 = __toESM(require("node:fs"), 1);
|
|
75776
|
+
import_node_path102 = __toESM(require("node:path"), 1);
|
|
75777
|
+
init_is_record();
|
|
75778
|
+
init_plist_bytes();
|
|
75779
|
+
init_swift_source_file();
|
|
75780
|
+
}
|
|
75781
|
+
});
|
|
75782
|
+
|
|
75696
75783
|
// src/intent-definition/system-types.ts
|
|
75697
75784
|
function systemIntentType(kind, name3) {
|
|
75698
75785
|
const hashes = kind === "Enum" ? systemEnumHashes : systemObjectHashes;
|
|
@@ -77300,17 +77387,17 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
77300
77387
|
throw new Error(`${definition2}: invalid intent code generation language ${language}`);
|
|
77301
77388
|
if (prefix) identifier(prefix);
|
|
77302
77389
|
if (module2) identifier(module2);
|
|
77303
|
-
const source =
|
|
77390
|
+
const source = import_node_fs100.default.readFileSync(definition2);
|
|
77304
77391
|
const key2 = (0, import_node_crypto59.createHash)("sha256").update(
|
|
77305
77392
|
JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
|
|
77306
77393
|
).update("\0").update(source).digest("hex");
|
|
77307
|
-
const cache =
|
|
77308
|
-
const output =
|
|
77309
|
-
const localization = definition2.split(
|
|
77310
|
-
const compiledRelative =
|
|
77311
|
-
const compiled =
|
|
77312
|
-
const generated =
|
|
77313
|
-
if (
|
|
77394
|
+
const cache = import_node_path103.default.join(derivedDirectory, "IntentDefinitions");
|
|
77395
|
+
const output = import_node_path103.default.join(cache, key2);
|
|
77396
|
+
const localization = definition2.split(import_node_path103.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
77397
|
+
const compiledRelative = import_node_path103.default.join("Resources", localization, import_node_path103.default.basename(definition2));
|
|
77398
|
+
const compiled = import_node_path103.default.join(output, compiledRelative);
|
|
77399
|
+
const generated = import_node_path103.default.join(output, "Sources");
|
|
77400
|
+
if (import_node_fs100.default.existsSync(compiled) && import_node_fs100.default.existsSync(generated)) return { compiled, generated };
|
|
77314
77401
|
let metadata;
|
|
77315
77402
|
let sources;
|
|
77316
77403
|
try {
|
|
@@ -77320,34 +77407,34 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
77320
77407
|
} catch (cause) {
|
|
77321
77408
|
throw new Error(`could not compile intent definition ${definition2}`, { cause });
|
|
77322
77409
|
}
|
|
77323
|
-
|
|
77324
|
-
const stage =
|
|
77410
|
+
import_node_fs100.default.mkdirSync(cache, { recursive: true });
|
|
77411
|
+
const stage = import_node_fs100.default.mkdtempSync(import_node_path103.default.join(cache, ".compile-"));
|
|
77325
77412
|
try {
|
|
77326
|
-
const sourceDirectory =
|
|
77327
|
-
const resource =
|
|
77328
|
-
|
|
77329
|
-
|
|
77330
|
-
|
|
77413
|
+
const sourceDirectory = import_node_path103.default.join(stage, "Sources");
|
|
77414
|
+
const resource = import_node_path103.default.join(stage, compiledRelative);
|
|
77415
|
+
import_node_fs100.default.mkdirSync(sourceDirectory);
|
|
77416
|
+
import_node_fs100.default.mkdirSync(import_node_path103.default.dirname(resource), { recursive: true });
|
|
77417
|
+
import_node_fs100.default.writeFileSync(resource, metadata);
|
|
77331
77418
|
for (const [file, contents2] of sources)
|
|
77332
|
-
|
|
77419
|
+
import_node_fs100.default.writeFileSync(import_node_path103.default.join(sourceDirectory, file), contents2);
|
|
77333
77420
|
try {
|
|
77334
|
-
|
|
77421
|
+
import_node_fs100.default.renameSync(stage, output);
|
|
77335
77422
|
} catch (error) {
|
|
77336
|
-
if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !
|
|
77423
|
+
if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !import_node_fs100.default.existsSync(compiled) || !import_node_fs100.default.existsSync(generated))
|
|
77337
77424
|
throw error;
|
|
77338
77425
|
}
|
|
77339
77426
|
return { compiled, generated };
|
|
77340
77427
|
} finally {
|
|
77341
|
-
|
|
77428
|
+
import_node_fs100.default.rmSync(stage, { recursive: true, force: true });
|
|
77342
77429
|
}
|
|
77343
77430
|
}
|
|
77344
|
-
var import_node_crypto59,
|
|
77431
|
+
var import_node_crypto59, import_node_fs100, import_node_path103, intentCompilerRevision;
|
|
77345
77432
|
var init_xcode_intents = __esm({
|
|
77346
77433
|
"src/xcode-intents.ts"() {
|
|
77347
77434
|
"use strict";
|
|
77348
77435
|
import_node_crypto59 = require("node:crypto");
|
|
77349
|
-
|
|
77350
|
-
|
|
77436
|
+
import_node_fs100 = __toESM(require("node:fs"), 1);
|
|
77437
|
+
import_node_path103 = __toESM(require("node:path"), 1);
|
|
77351
77438
|
init_fields();
|
|
77352
77439
|
init_metadata();
|
|
77353
77440
|
init_plist_reader();
|
|
@@ -77403,7 +77490,7 @@ function remoteVersionRequirement(entry) {
|
|
|
77403
77490
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
77404
77491
|
const json = Bun.JSON5.parse(source);
|
|
77405
77492
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
77406
|
-
const projectDir =
|
|
77493
|
+
const projectDir = import_node_path104.default.dirname(xcodeproj);
|
|
77407
77494
|
const objects = {};
|
|
77408
77495
|
let next = 0;
|
|
77409
77496
|
const add = (entry, id) => {
|
|
@@ -77416,7 +77503,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
77416
77503
|
const base2 = /^<([A-Z]+)>\/(.*)$/.exec(raw2);
|
|
77417
77504
|
if (base2) {
|
|
77418
77505
|
if (base2[1] === "PROJECT")
|
|
77419
|
-
return { sourceTree: "<absolute>", path:
|
|
77506
|
+
return { sourceTree: "<absolute>", path: import_node_path104.default.join(projectDir, base2[2]) };
|
|
77420
77507
|
if (base2[1] === "PRODUCTS")
|
|
77421
77508
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base2[2] };
|
|
77422
77509
|
return null;
|
|
@@ -77424,7 +77511,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
77424
77511
|
const unescaped = raw2.replaceAll("\\<", "<");
|
|
77425
77512
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
77426
77513
|
if (unescaped.startsWith("~")) return null;
|
|
77427
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
77514
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path104.default.join(groupDir, unescaped) };
|
|
77428
77515
|
};
|
|
77429
77516
|
const memberships = [];
|
|
77430
77517
|
const folders = [];
|
|
@@ -77435,7 +77522,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
77435
77522
|
const kind = text6(entry.kind) ?? "file-reference";
|
|
77436
77523
|
const raw2 = text6(entry.path) ?? "";
|
|
77437
77524
|
const located = raw2 === "" ? null : locate(raw2, parent.dir);
|
|
77438
|
-
const name3 = text6(entry.name) ??
|
|
77525
|
+
const name3 = text6(entry.name) ?? import_node_path104.default.basename(raw2);
|
|
77439
77526
|
const node = { id: "", name: name3, dir: null, parent, children: [] };
|
|
77440
77527
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
77441
77528
|
node.dir = raw2 === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -77556,7 +77643,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
77556
77643
|
if (!isObject(entry)) continue;
|
|
77557
77644
|
const repository = text6(entry.repository);
|
|
77558
77645
|
const local = text6(entry.path);
|
|
77559
|
-
const name3 = local !== void 0 ?
|
|
77646
|
+
const name3 = local !== void 0 ? import_node_path104.default.basename(import_node_path104.default.resolve(import_node_path104.default.dirname(xcodeproj), local)) : import_node_path104.default.basename(repository ?? "").replace(/\.git$/, "");
|
|
77560
77647
|
const id = text6(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
|
|
77561
77648
|
isa: "XCRemoteSwiftPackageReference",
|
|
77562
77649
|
repositoryURL: repository ?? "",
|
|
@@ -77728,11 +77815,11 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
77728
77815
|
function isJsonObject(value) {
|
|
77729
77816
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
77730
77817
|
}
|
|
77731
|
-
var
|
|
77818
|
+
var import_node_path104, isObject, text6, items, PHASE_ISA;
|
|
77732
77819
|
var init_xcode_json_project = __esm({
|
|
77733
77820
|
"src/xcode-json-project.ts"() {
|
|
77734
77821
|
"use strict";
|
|
77735
|
-
|
|
77822
|
+
import_node_path104 = __toESM(require("node:path"), 1);
|
|
77736
77823
|
isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
77737
77824
|
text6 = (value) => typeof value === "string" ? value : void 0;
|
|
77738
77825
|
items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -77814,27 +77901,27 @@ var init_xcode_swift_features = __esm({
|
|
|
77814
77901
|
|
|
77815
77902
|
// src/xcode-project.ts
|
|
77816
77903
|
function walkFiles(dir) {
|
|
77817
|
-
if (!
|
|
77904
|
+
if (!import_node_fs101.default.existsSync(dir)) return [];
|
|
77818
77905
|
const out = [];
|
|
77819
|
-
for (const entry of
|
|
77906
|
+
for (const entry of import_node_fs101.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
77820
77907
|
if (entry.name.startsWith(".")) continue;
|
|
77821
|
-
const full =
|
|
77908
|
+
const full = import_node_path105.default.join(dir, entry.name);
|
|
77822
77909
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
77823
77910
|
else if (entry.isFile()) out.push(full);
|
|
77824
77911
|
}
|
|
77825
77912
|
return out;
|
|
77826
77913
|
}
|
|
77827
77914
|
function readXcconfig(file, read2) {
|
|
77828
|
-
if (read2.includes(file) || !
|
|
77915
|
+
if (read2.includes(file) || !import_node_fs101.default.existsSync(file)) return {};
|
|
77829
77916
|
read2.push(file);
|
|
77830
77917
|
const settings = {};
|
|
77831
|
-
for (const raw2 of
|
|
77918
|
+
for (const raw2 of import_node_fs101.default.readFileSync(file, "utf8").split("\n")) {
|
|
77832
77919
|
const line = raw2.replace(/\/\/.*$/, "").trim();
|
|
77833
77920
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
77834
77921
|
if (include) {
|
|
77835
77922
|
Object.assign(
|
|
77836
77923
|
settings,
|
|
77837
|
-
readXcconfig(
|
|
77924
|
+
readXcconfig(import_node_path105.default.resolve(import_node_path105.default.dirname(file), include[1]), read2)
|
|
77838
77925
|
);
|
|
77839
77926
|
continue;
|
|
77840
77927
|
}
|
|
@@ -77879,8 +77966,8 @@ function applyOperator(value, operator) {
|
|
|
77879
77966
|
return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
77880
77967
|
case "standardizepath":
|
|
77881
77968
|
if (value === ".") return value;
|
|
77882
|
-
if (
|
|
77883
|
-
return
|
|
77969
|
+
if (import_node_path105.default.posix.isAbsolute(value))
|
|
77970
|
+
return import_node_path105.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
|
|
77884
77971
|
return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
|
|
77885
77972
|
}
|
|
77886
77973
|
throw new Error(`unsupported build setting operator :${operator}`);
|
|
@@ -77889,22 +77976,22 @@ function decodeXml(text7) {
|
|
|
77889
77976
|
return text7.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
77890
77977
|
}
|
|
77891
77978
|
function workspaceReferences(workspace) {
|
|
77892
|
-
const data =
|
|
77893
|
-
if (!
|
|
77979
|
+
const data = import_node_path105.default.join(workspace, "contents.xcworkspacedata");
|
|
77980
|
+
if (!import_node_fs101.default.existsSync(data))
|
|
77894
77981
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
77895
|
-
const container =
|
|
77982
|
+
const container = import_node_path105.default.dirname(workspace);
|
|
77896
77983
|
const locate = (location, base2) => {
|
|
77897
77984
|
const colon = location.indexOf(":");
|
|
77898
77985
|
const kind = location.slice(0, colon);
|
|
77899
77986
|
const rest = location.slice(colon + 1);
|
|
77900
|
-
if (kind === "group") return
|
|
77901
|
-
if (kind === "container" || kind === "self") return
|
|
77902
|
-
if (kind === "absolute") return
|
|
77903
|
-
throw new Error(`${
|
|
77987
|
+
if (kind === "group") return import_node_path105.default.resolve(base2, rest);
|
|
77988
|
+
if (kind === "container" || kind === "self") return import_node_path105.default.resolve(container, rest);
|
|
77989
|
+
if (kind === "absolute") return import_node_path105.default.resolve(rest);
|
|
77990
|
+
throw new Error(`${import_node_path105.default.basename(workspace)} has an unsupported location ${location}`);
|
|
77904
77991
|
};
|
|
77905
77992
|
const groups = [container];
|
|
77906
77993
|
const references = [];
|
|
77907
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
77994
|
+
for (const [, closing, tag, attributes, selfClosing] of import_node_fs101.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
77908
77995
|
if (closing) {
|
|
77909
77996
|
if (tag === "Group") groups.pop();
|
|
77910
77997
|
continue;
|
|
@@ -77918,29 +78005,29 @@ function workspaceReferences(workspace) {
|
|
|
77918
78005
|
return references;
|
|
77919
78006
|
}
|
|
77920
78007
|
function enclosingXcodeWorkspace(xcodeproj) {
|
|
77921
|
-
const project2 =
|
|
77922
|
-
for (let dir =
|
|
77923
|
-
for (const name3 of
|
|
78008
|
+
const project2 = import_node_fs101.default.realpathSync.native(xcodeproj);
|
|
78009
|
+
for (let dir = import_node_path105.default.dirname(project2); ; dir = import_node_path105.default.dirname(dir)) {
|
|
78010
|
+
for (const name3 of import_node_fs101.default.readdirSync(dir).sort()) {
|
|
77924
78011
|
if (!name3.endsWith(".xcworkspace")) continue;
|
|
77925
|
-
const workspace =
|
|
77926
|
-
if (!
|
|
78012
|
+
const workspace = import_node_path105.default.join(dir, name3);
|
|
78013
|
+
if (!import_node_fs101.default.existsSync(import_node_path105.default.join(workspace, "contents.xcworkspacedata"))) continue;
|
|
77927
78014
|
if (workspaceReferences(workspace).some(
|
|
77928
|
-
(reference) =>
|
|
78015
|
+
(reference) => import_node_fs101.default.existsSync(reference) && import_node_fs101.default.realpathSync.native(reference) === project2
|
|
77929
78016
|
))
|
|
77930
78017
|
return workspace;
|
|
77931
78018
|
}
|
|
77932
|
-
if (
|
|
78019
|
+
if (import_node_fs101.default.existsSync(import_node_path105.default.join(dir, ".git")) || import_node_path105.default.dirname(dir) === dir) return null;
|
|
77933
78020
|
}
|
|
77934
78021
|
}
|
|
77935
78022
|
function findXcodeProject(input) {
|
|
77936
|
-
const resolved =
|
|
78023
|
+
const resolved = import_node_path105.default.resolve(input);
|
|
77937
78024
|
if (resolved.endsWith(".xcworkspace")) {
|
|
77938
|
-
return
|
|
78025
|
+
return import_node_path105.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path105.default.dirname(resolved) : resolved;
|
|
77939
78026
|
}
|
|
77940
78027
|
if (resolved.endsWith(".xcodeproj")) return resolved;
|
|
77941
78028
|
if (!isDirectory3(resolved)) return null;
|
|
77942
78029
|
for (const extension of [".xcworkspace", ".xcodeproj"]) {
|
|
77943
|
-
const found2 =
|
|
78030
|
+
const found2 = import_node_fs101.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
|
|
77944
78031
|
if (found2.length > 1) {
|
|
77945
78032
|
if (extension === ".xcworkspace") {
|
|
77946
78033
|
const selected = selectXcodeWorkspace(resolved, found2);
|
|
@@ -77950,14 +78037,14 @@ function findXcodeProject(input) {
|
|
|
77950
78037
|
`${resolved} holds ${found2.length} ${extension} bundles (${found2.join(", ")}); pass one`
|
|
77951
78038
|
);
|
|
77952
78039
|
}
|
|
77953
|
-
if (found2.length === 1) return
|
|
78040
|
+
if (found2.length === 1) return import_node_path105.default.join(resolved, found2[0]);
|
|
77954
78041
|
}
|
|
77955
78042
|
return null;
|
|
77956
78043
|
}
|
|
77957
78044
|
function sameXcodeProject(reference, xcodeproj) {
|
|
77958
|
-
if (
|
|
78045
|
+
if (import_node_path105.default.normalize(reference) === import_node_path105.default.normalize(xcodeproj)) return true;
|
|
77959
78046
|
try {
|
|
77960
|
-
return
|
|
78047
|
+
return import_node_fs101.default.existsSync(reference) && import_node_fs101.default.existsSync(xcodeproj) && import_node_fs101.default.realpathSync.native(reference) === import_node_fs101.default.realpathSync.native(xcodeproj);
|
|
77961
78048
|
} catch {
|
|
77962
78049
|
return false;
|
|
77963
78050
|
}
|
|
@@ -77965,38 +78052,38 @@ function sameXcodeProject(reference, xcodeproj) {
|
|
|
77965
78052
|
function selectXcodeWorkspace(directory2, workspaces) {
|
|
77966
78053
|
const sorted2 = [...workspaces].sort();
|
|
77967
78054
|
if (sorted2.length === 0) return null;
|
|
77968
|
-
if (sorted2.length === 1) return
|
|
77969
|
-
const xcodeprojs =
|
|
78055
|
+
if (sorted2.length === 1) return import_node_path105.default.join(directory2, sorted2[0]);
|
|
78056
|
+
const xcodeprojs = import_node_fs101.default.readdirSync(directory2).filter((name3) => name3.endsWith(".xcodeproj")).sort();
|
|
77970
78057
|
if (xcodeprojs.length !== 1) return null;
|
|
77971
|
-
const app =
|
|
78058
|
+
const app = import_node_path105.default.join(directory2, xcodeprojs[0]);
|
|
77972
78059
|
const referencing = sorted2.filter((workspace) => {
|
|
77973
78060
|
try {
|
|
77974
|
-
return workspaceReferences(
|
|
78061
|
+
return workspaceReferences(import_node_path105.default.join(directory2, workspace)).some(
|
|
77975
78062
|
(reference) => sameXcodeProject(reference, app)
|
|
77976
78063
|
);
|
|
77977
78064
|
} catch {
|
|
77978
78065
|
return false;
|
|
77979
78066
|
}
|
|
77980
78067
|
});
|
|
77981
|
-
if (referencing.length === 1) return
|
|
78068
|
+
if (referencing.length === 1) return import_node_path105.default.join(directory2, referencing[0]);
|
|
77982
78069
|
if (referencing.length === 0) return null;
|
|
77983
|
-
const own2 = `${
|
|
78070
|
+
const own2 = `${import_node_path105.default.basename(app, ".xcodeproj")}.xcworkspace`;
|
|
77984
78071
|
const named = referencing.filter((workspace) => workspace === own2);
|
|
77985
|
-
return named.length === 1 ?
|
|
78072
|
+
return named.length === 1 ? import_node_path105.default.join(directory2, named[0]) : null;
|
|
77986
78073
|
}
|
|
77987
78074
|
function installedXcodeWorkspace(projectRoot) {
|
|
77988
|
-
const ios =
|
|
77989
|
-
if (!
|
|
78075
|
+
const ios = import_node_path105.default.join(projectRoot, "ios");
|
|
78076
|
+
if (!import_node_fs101.default.existsSync(ios)) return null;
|
|
77990
78077
|
return selectXcodeWorkspace(
|
|
77991
78078
|
ios,
|
|
77992
|
-
|
|
78079
|
+
import_node_fs101.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
|
|
77993
78080
|
);
|
|
77994
78081
|
}
|
|
77995
78082
|
function requireInstalledXcodeWorkspace(projectRoot, needed) {
|
|
77996
78083
|
const workspace = installedXcodeWorkspace(projectRoot);
|
|
77997
78084
|
if (!workspace)
|
|
77998
78085
|
throw new Error(
|
|
77999
|
-
`${needed} needs an installed pod workspace in ${
|
|
78086
|
+
`${needed} needs an installed pod workspace in ${import_node_path105.default.join(projectRoot, "ios")}`
|
|
78000
78087
|
);
|
|
78001
78088
|
return workspace;
|
|
78002
78089
|
}
|
|
@@ -78037,8 +78124,8 @@ function remotePackageRequirements(projects2) {
|
|
|
78037
78124
|
}
|
|
78038
78125
|
function xcodeProjectFile(xcodeproj) {
|
|
78039
78126
|
for (const name3 of ["project.pbxproj", "project.xcproj"]) {
|
|
78040
|
-
const file =
|
|
78041
|
-
if (
|
|
78127
|
+
const file = import_node_path105.default.join(xcodeproj, name3);
|
|
78128
|
+
if (import_node_fs101.default.existsSync(file)) return file;
|
|
78042
78129
|
}
|
|
78043
78130
|
return null;
|
|
78044
78131
|
}
|
|
@@ -78046,7 +78133,7 @@ function loadProject(xcodeproj) {
|
|
|
78046
78133
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
78047
78134
|
if (!projectFile)
|
|
78048
78135
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
78049
|
-
const source =
|
|
78136
|
+
const source = import_node_fs101.default.readFileSync(projectFile, "utf8");
|
|
78050
78137
|
const digest3 = (0, import_node_crypto60.createHash)("sha256").update(source).digest("hex");
|
|
78051
78138
|
const cached4 = loaded3.get(projectFile);
|
|
78052
78139
|
if (cached4?.digest === digest3) return cached4.project;
|
|
@@ -78063,10 +78150,10 @@ function loadProject(xcodeproj) {
|
|
|
78063
78150
|
if (!project2 || project2.isa !== "PBXProject") {
|
|
78064
78151
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
78065
78152
|
}
|
|
78066
|
-
const projectDir =
|
|
78067
|
-
|
|
78153
|
+
const projectDir = import_node_fs101.default.realpathSync.native(
|
|
78154
|
+
import_node_path105.default.resolve(import_node_path105.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
|
|
78068
78155
|
);
|
|
78069
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
78156
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path105.default.join);
|
|
78070
78157
|
const result = {
|
|
78071
78158
|
xcodeproj,
|
|
78072
78159
|
projectFile,
|
|
@@ -78097,9 +78184,9 @@ function xcodeInstallationIdentity() {
|
|
|
78097
78184
|
if (process.platform !== "darwin") return null;
|
|
78098
78185
|
const selected = process.env.DEVELOPER_DIR || selectedDeveloperDir(true);
|
|
78099
78186
|
if (!selected) return null;
|
|
78100
|
-
const directory2 =
|
|
78187
|
+
const directory2 = import_node_path105.default.extname(selected) === ".app" ? import_node_path105.default.join(selected, "Contents", "Developer") : selected;
|
|
78101
78188
|
const versionFile = `${directory2}/../version.plist`;
|
|
78102
|
-
const version2 =
|
|
78189
|
+
const version2 = import_node_fs101.default.existsSync(versionFile) ? (0, import_node_crypto60.createHash)("sha256").update(import_node_fs101.default.readFileSync(versionFile)).digest("hex") : null;
|
|
78103
78190
|
return { directory: directory2, version: version2 };
|
|
78104
78191
|
}
|
|
78105
78192
|
function defaultConfiguration(project2) {
|
|
@@ -78119,7 +78206,7 @@ function expandValue(value, settings) {
|
|
|
78119
78206
|
return value;
|
|
78120
78207
|
}
|
|
78121
78208
|
function processedInfoPlist(name3, file, settings, settingKeys) {
|
|
78122
|
-
const source = file ? parsePlist(
|
|
78209
|
+
const source = file ? parsePlist(import_node_fs101.default.readFileSync(file, "utf8")) : {};
|
|
78123
78210
|
if (!source || typeof source !== "object" || Array.isArray(source) || source instanceof Date || Buffer.isBuffer(source))
|
|
78124
78211
|
throw new Error(`${name3} Info.plist must contain a dictionary`);
|
|
78125
78212
|
const info = {};
|
|
@@ -78159,8 +78246,8 @@ function targetSettings(ref, configuration2, builtins, options2 = {}, overrides
|
|
|
78159
78246
|
const relative6 = str2(config.baseConfigurationReferenceRelativePath);
|
|
78160
78247
|
const own2 = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
78161
78248
|
const directory2 = anchor ? project2.resolvePath(anchor) : null;
|
|
78162
|
-
const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative6 ?
|
|
78163
|
-
if ((options2.requireSources !== false || options2.installedPods) && (base2 || anchor || relative6) && (!baseFile || !
|
|
78249
|
+
const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative6 ? import_node_path105.default.resolve(directory2, relative6) : null;
|
|
78250
|
+
if ((options2.requireSources !== false || options2.installedPods) && (base2 || anchor || relative6) && (!baseFile || !import_node_fs101.default.existsSync(baseFile)))
|
|
78164
78251
|
throw new Error(
|
|
78165
78252
|
`Unable to open base configuration reference file '${baseFile ?? base2 ?? relative6 ?? anchor}'`
|
|
78166
78253
|
);
|
|
@@ -78254,10 +78341,10 @@ function hostMacroPluginFlags(flags) {
|
|
|
78254
78341
|
if (flags[index - 1] !== "-load-plugin-executable") return flag;
|
|
78255
78342
|
const separator = flag.lastIndexOf("#");
|
|
78256
78343
|
if (separator < 0) return flag;
|
|
78257
|
-
const root =
|
|
78258
|
-
const manifest =
|
|
78259
|
-
if (!
|
|
78260
|
-
const pkg = JSON.parse(
|
|
78344
|
+
const root = import_node_path105.default.dirname(import_node_path105.default.dirname(flag.slice(0, separator)));
|
|
78345
|
+
const manifest = import_node_path105.default.join(root, "package.json");
|
|
78346
|
+
if (!import_node_fs101.default.existsSync(manifest)) return flag;
|
|
78347
|
+
const pkg = JSON.parse(import_node_fs101.default.readFileSync(manifest, "utf8"));
|
|
78261
78348
|
if (!isRecord(pkg) || pkg.name !== "expo-modules-macros") return flag;
|
|
78262
78349
|
const macros = (0, import_node_module9.createRequire)(manifest)(root);
|
|
78263
78350
|
if (!isRecord(macros) || typeof macros.getScannerBinaryPath !== "function")
|
|
@@ -78275,26 +78362,26 @@ function scriptCommand(shell, script) {
|
|
|
78275
78362
|
return [executable, ...args, "-c", script];
|
|
78276
78363
|
}
|
|
78277
78364
|
function expandSearchPath(directory2, rules2) {
|
|
78278
|
-
if (
|
|
78365
|
+
if (import_node_path105.default.basename(directory2) !== "**") return [directory2];
|
|
78279
78366
|
const expanded = [];
|
|
78280
78367
|
const seen = /* @__PURE__ */ new Set();
|
|
78281
|
-
const queue = [
|
|
78368
|
+
const queue = [import_node_path105.default.dirname(directory2)];
|
|
78282
78369
|
for (let at = 0; at < queue.length; at++) {
|
|
78283
78370
|
const current2 = queue[at];
|
|
78284
78371
|
let real;
|
|
78285
78372
|
try {
|
|
78286
|
-
real =
|
|
78373
|
+
real = import_node_fs101.default.realpathSync.native(current2);
|
|
78287
78374
|
} catch {
|
|
78288
78375
|
continue;
|
|
78289
78376
|
}
|
|
78290
|
-
if (!
|
|
78377
|
+
if (!import_node_fs101.default.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
78291
78378
|
seen.add(real);
|
|
78292
78379
|
expanded.push(current2);
|
|
78293
|
-
for (const entry of
|
|
78380
|
+
for (const entry of import_node_fs101.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
78294
78381
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
78295
78382
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
78296
78383
|
continue;
|
|
78297
|
-
queue.push(
|
|
78384
|
+
queue.push(import_node_path105.default.join(current2, entry.name));
|
|
78298
78385
|
}
|
|
78299
78386
|
}
|
|
78300
78387
|
return expanded;
|
|
@@ -78305,7 +78392,7 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
78305
78392
|
const rules2 = recursiveSearchRules(settings);
|
|
78306
78393
|
const directories = new Set(
|
|
78307
78394
|
settingList(settings("LIBRARY_SEARCH_PATHS")).flatMap(
|
|
78308
|
-
(raw2) => expandSearchPath(
|
|
78395
|
+
(raw2) => expandSearchPath(import_node_path105.default.resolve(projectDir, expand(raw2, settings)), rules2)
|
|
78309
78396
|
)
|
|
78310
78397
|
);
|
|
78311
78398
|
const resolved = [];
|
|
@@ -78318,18 +78405,18 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
78318
78405
|
}
|
|
78319
78406
|
let archive;
|
|
78320
78407
|
for (const directory2 of directories) {
|
|
78321
|
-
const file = (extension) =>
|
|
78408
|
+
const file = (extension) => import_node_path105.default.join(directory2, `lib${name3}.${extension}`);
|
|
78322
78409
|
const dylib = file("dylib");
|
|
78323
|
-
const parent =
|
|
78410
|
+
const parent = import_node_path105.default.dirname(dylib);
|
|
78324
78411
|
let present = libraryDirectories.get(parent);
|
|
78325
78412
|
if (present === void 0) {
|
|
78326
|
-
present =
|
|
78413
|
+
present = import_node_fs101.default.existsSync(parent);
|
|
78327
78414
|
libraryDirectories.set(parent, present);
|
|
78328
78415
|
}
|
|
78329
78416
|
if (!present) continue;
|
|
78330
|
-
if (
|
|
78417
|
+
if (import_node_fs101.default.existsSync(dylib) || import_node_fs101.default.existsSync(file("tbd"))) break;
|
|
78331
78418
|
const staticLibrary = file("a");
|
|
78332
|
-
if (!
|
|
78419
|
+
if (!import_node_fs101.default.existsSync(staticLibrary)) continue;
|
|
78333
78420
|
archive = staticLibrary;
|
|
78334
78421
|
break;
|
|
78335
78422
|
}
|
|
@@ -78426,7 +78513,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
78426
78513
|
for (const token of tokens2) {
|
|
78427
78514
|
if (token.startsWith("-")) break;
|
|
78428
78515
|
const file = resolve11(token);
|
|
78429
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
78516
|
+
if (file?.endsWith(".xcassets")) catalogs.push(import_node_path105.default.resolve(projectDir, file));
|
|
78430
78517
|
}
|
|
78431
78518
|
}
|
|
78432
78519
|
return catalogs;
|
|
@@ -78471,14 +78558,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
78471
78558
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
78472
78559
|
return [];
|
|
78473
78560
|
copies.push({
|
|
78474
|
-
from:
|
|
78475
|
-
to:
|
|
78561
|
+
from: import_node_path105.default.resolve(projectDir, operands[0]),
|
|
78562
|
+
to: import_node_path105.default.resolve(projectDir, operands[1])
|
|
78476
78563
|
});
|
|
78477
78564
|
}
|
|
78478
78565
|
return copies;
|
|
78479
78566
|
}
|
|
78480
78567
|
function fileListEntries(file, absolute) {
|
|
78481
|
-
return
|
|
78568
|
+
return import_node_fs101.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
78482
78569
|
}
|
|
78483
78570
|
function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
78484
78571
|
const { project: project2, target, id: targetId } = ref;
|
|
@@ -78492,17 +78579,17 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78492
78579
|
const copiedFiles = [];
|
|
78493
78580
|
let generatedInfoPlist = false;
|
|
78494
78581
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
78495
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
78582
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path105.default.resolve(project2.projectDir, declaredInfoPlist) : null;
|
|
78496
78583
|
const isPreparedOutput = (file) => file === infoPlistOutput || options2.requireSources !== false && file.endsWith(".swift");
|
|
78497
78584
|
let absentSources = false;
|
|
78498
78585
|
if (options2.prepareGeneratedSources === true && options2.requireSources !== false)
|
|
78499
78586
|
project2.visitMembers(
|
|
78500
78587
|
targetId,
|
|
78501
|
-
xcodePathResolver(project2.objects, project2.projectDir,
|
|
78502
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
78503
|
-
|
|
78588
|
+
xcodePathResolver(project2.objects, project2.projectDir, import_node_path105.default.join, settings),
|
|
78589
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs101.default.existsSync(file) ? [file] : [],
|
|
78590
|
+
import_node_path105.default.join,
|
|
78504
78591
|
(file, kind) => {
|
|
78505
|
-
if (kind !== "header" && kind !== "resource" && !
|
|
78592
|
+
if (kind !== "header" && kind !== "resource" && !import_node_fs101.default.existsSync(file))
|
|
78506
78593
|
absentSources = true;
|
|
78507
78594
|
}
|
|
78508
78595
|
);
|
|
@@ -78521,7 +78608,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78521
78608
|
copiedFiles.push(
|
|
78522
78609
|
...shellCopies(str2(phase.shellScript) ?? "", settings, project2.projectDir)
|
|
78523
78610
|
);
|
|
78524
|
-
const absolute = (raw2) =>
|
|
78611
|
+
const absolute = (raw2) => import_node_path105.default.resolve(project2.projectDir, expand(raw2, settings));
|
|
78525
78612
|
const inputs2 = list(phase.inputPaths).map(absolute);
|
|
78526
78613
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
78527
78614
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -78530,7 +78617,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78530
78617
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
78531
78618
|
).map((raw2) => {
|
|
78532
78619
|
const file = absolute(raw2);
|
|
78533
|
-
if (!
|
|
78620
|
+
if (!import_node_fs101.default.existsSync(file)) {
|
|
78534
78621
|
return { file, entries: [] };
|
|
78535
78622
|
}
|
|
78536
78623
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -78551,14 +78638,14 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78551
78638
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
78552
78639
|
];
|
|
78553
78640
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
78554
|
-
for (const file of inputFiles) if (
|
|
78641
|
+
for (const file of inputFiles) if (import_node_fs101.default.existsSync(file)) projectInputs.add(file);
|
|
78555
78642
|
}
|
|
78556
78643
|
const undeclaredGenerator = absentSources && beforeSources && allOutputs.length === 0 && str2(phase.runOnlyForDeploymentPostprocessing) !== "1";
|
|
78557
78644
|
if (options2.prepareGeneratedSources === true && (allOutputs.some(isPreparedOutput) || undeclaredGenerator)) {
|
|
78558
|
-
const phaseDir =
|
|
78645
|
+
const phaseDir = import_node_path105.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
78559
78646
|
for (const lists of fileLists.values())
|
|
78560
78647
|
for (const { file } of lists)
|
|
78561
|
-
if (!
|
|
78648
|
+
if (!import_node_fs101.default.existsSync(file))
|
|
78562
78649
|
throw new Error(
|
|
78563
78650
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
78564
78651
|
);
|
|
@@ -78577,7 +78664,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78577
78664
|
const lists = fileLists.get(kind);
|
|
78578
78665
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
78579
78666
|
lists.forEach((_item, index) => {
|
|
78580
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
78667
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path105.default.join(
|
|
78581
78668
|
phaseDir,
|
|
78582
78669
|
`${kind}-${index}.xcfilelist`
|
|
78583
78670
|
);
|
|
@@ -78588,22 +78675,22 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78588
78675
|
);
|
|
78589
78676
|
for (const file of inputFiles) {
|
|
78590
78677
|
signature2.update(file);
|
|
78591
|
-
if (
|
|
78592
|
-
const stat2 =
|
|
78678
|
+
if (import_node_fs101.default.existsSync(file)) {
|
|
78679
|
+
const stat2 = import_node_fs101.default.statSync(file);
|
|
78593
78680
|
signature2.update(`${stat2.mtimeMs}:${stat2.ctimeMs}:${stat2.size}`);
|
|
78594
78681
|
} else signature2.update("missing");
|
|
78595
78682
|
}
|
|
78596
78683
|
const stamp = signature2.digest("hex");
|
|
78597
78684
|
const key2 = `${project2.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
78598
|
-
if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) =>
|
|
78685
|
+
if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs101.default.existsSync(file)))
|
|
78599
78686
|
continue;
|
|
78600
|
-
|
|
78687
|
+
import_node_fs101.default.mkdirSync(phaseDir, { recursive: true });
|
|
78601
78688
|
if (process.platform === "linux") {
|
|
78602
78689
|
const bin = swiftToolchainBin(
|
|
78603
78690
|
privateSwiftRelease() ?? swiftNativePin().distribution.release
|
|
78604
78691
|
);
|
|
78605
|
-
const startup =
|
|
78606
|
-
|
|
78692
|
+
const startup = import_node_path105.default.join(phaseDir, "peach-tools.sh");
|
|
78693
|
+
import_node_fs101.default.writeFileSync(
|
|
78607
78694
|
startup,
|
|
78608
78695
|
'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
|
|
78609
78696
|
);
|
|
@@ -78612,15 +78699,15 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78612
78699
|
env.PEACH_PHASE_TOOLCHAIN = bin;
|
|
78613
78700
|
env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
|
|
78614
78701
|
env.BASH_ENV = startup;
|
|
78615
|
-
env.PATH = [bin, env.PATH].filter(Boolean).join(
|
|
78702
|
+
env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path105.default.delimiter);
|
|
78616
78703
|
}
|
|
78617
|
-
|
|
78618
|
-
|
|
78704
|
+
import_node_fs101.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
78705
|
+
import_node_fs101.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
78619
78706
|
for (const output of allOutputs)
|
|
78620
|
-
|
|
78707
|
+
import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
|
|
78621
78708
|
for (const [kind, lists] of fileLists)
|
|
78622
78709
|
lists.forEach((item, index) => {
|
|
78623
|
-
|
|
78710
|
+
import_node_fs101.default.writeFileSync(
|
|
78624
78711
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
78625
78712
|
`${item.entries.join("\n")}
|
|
78626
78713
|
`
|
|
@@ -78628,9 +78715,9 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
78628
78715
|
});
|
|
78629
78716
|
const rawScript = str2(phase.shellScript) ?? "";
|
|
78630
78717
|
if (rawScript.includes("generate-modules-provider")) {
|
|
78631
|
-
const preloadPath =
|
|
78632
|
-
|
|
78633
|
-
|
|
78718
|
+
const preloadPath = import_node_path105.default.join(phaseDir, "expo-scan-timeout.cjs");
|
|
78719
|
+
import_node_fs101.default.mkdirSync(phaseDir, { recursive: true });
|
|
78720
|
+
import_node_fs101.default.writeFileSync(
|
|
78634
78721
|
preloadPath,
|
|
78635
78722
|
[
|
|
78636
78723
|
"const cp = require('node:child_process');",
|
|
@@ -78668,7 +78755,7 @@ ${output}`
|
|
|
78668
78755
|
);
|
|
78669
78756
|
}
|
|
78670
78757
|
const missing2 = allOutputs.filter(
|
|
78671
|
-
(file) => file === infoPlistOutput && !
|
|
78758
|
+
(file) => file === infoPlistOutput && !import_node_fs101.default.existsSync(file)
|
|
78672
78759
|
);
|
|
78673
78760
|
if (missing2.length > 0)
|
|
78674
78761
|
throw new Error(
|
|
@@ -78679,9 +78766,9 @@ ${output}`
|
|
|
78679
78766
|
}
|
|
78680
78767
|
project2.visitMembers(
|
|
78681
78768
|
targetId,
|
|
78682
|
-
xcodePathResolver(project2.objects, project2.projectDir,
|
|
78683
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
78684
|
-
|
|
78769
|
+
xcodePathResolver(project2.objects, project2.projectDir, import_node_path105.default.join, settings),
|
|
78770
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs101.default.existsSync(file) ? [file] : [],
|
|
78771
|
+
import_node_path105.default.join,
|
|
78685
78772
|
(file, kind, bundleName) => {
|
|
78686
78773
|
if (kind === "header") {
|
|
78687
78774
|
headers.add(file);
|
|
@@ -78692,9 +78779,9 @@ ${output}`
|
|
|
78692
78779
|
if (bundleName) resourceNames[file] = bundleName;
|
|
78693
78780
|
return;
|
|
78694
78781
|
}
|
|
78695
|
-
if (!
|
|
78782
|
+
if (!import_node_fs101.default.existsSync(file)) {
|
|
78696
78783
|
if (options2.requireSources === false) return;
|
|
78697
|
-
const script = scriptForOutput.get(
|
|
78784
|
+
const script = scriptForOutput.get(import_node_path105.default.normalize(file));
|
|
78698
78785
|
throw new Error(
|
|
78699
78786
|
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}`
|
|
78700
78787
|
);
|
|
@@ -78705,21 +78792,21 @@ ${output}`
|
|
|
78705
78792
|
);
|
|
78706
78793
|
if (options2.prepareGeneratedSources && options2.requireSources !== false) {
|
|
78707
78794
|
const interfaceFiles = [...resources].filter(
|
|
78708
|
-
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(
|
|
78795
|
+
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path105.default.sep).some((part) => part.endsWith(".bundle"))
|
|
78709
78796
|
);
|
|
78710
78797
|
let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
|
|
78711
|
-
if (process.platform !== "darwin" && !launchName && infoPlistOutput &&
|
|
78712
|
-
const info = parsePlist(
|
|
78798
|
+
if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs101.default.existsSync(infoPlistOutput)) {
|
|
78799
|
+
const info = parsePlist(import_node_fs101.default.readFileSync(infoPlistOutput, "utf8"));
|
|
78713
78800
|
const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
|
|
78714
78801
|
if (typeof declared === "string") launchName = expand(declared, settings);
|
|
78715
78802
|
}
|
|
78716
78803
|
const interfaceOutputs = /* @__PURE__ */ new Set();
|
|
78717
78804
|
for (const file of interfaceFiles) {
|
|
78718
|
-
const localization = file.split(
|
|
78805
|
+
const localization = file.split(import_node_path105.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
78719
78806
|
const isStoryboard = file.endsWith(".storyboard");
|
|
78720
78807
|
const extension = isStoryboard ? ".storyboardc" : ".nib";
|
|
78721
|
-
const name3 =
|
|
78722
|
-
const output =
|
|
78808
|
+
const name3 = import_node_path105.default.basename(file, import_node_path105.default.extname(file));
|
|
78809
|
+
const output = import_node_path105.default.join(
|
|
78723
78810
|
settings("DERIVED_FILE_DIR"),
|
|
78724
78811
|
"InterfaceBuilder",
|
|
78725
78812
|
localization,
|
|
@@ -78738,10 +78825,10 @@ ${output}`
|
|
|
78738
78825
|
const inputs2 = JSON.stringify([
|
|
78739
78826
|
1,
|
|
78740
78827
|
args,
|
|
78741
|
-
(0, import_node_crypto60.createHash)("sha256").update(
|
|
78828
|
+
(0, import_node_crypto60.createHash)("sha256").update(import_node_fs101.default.readFileSync(file)).digest("hex")
|
|
78742
78829
|
]);
|
|
78743
78830
|
const developer = settings("DEVELOPER_DIR");
|
|
78744
|
-
const cached4 =
|
|
78831
|
+
const cached4 = import_node_fs101.default.existsSync(output) && import_node_fs101.default.existsSync(stamp) ? import_node_fs101.default.readFileSync(stamp, "utf8").split("\n") : [];
|
|
78745
78832
|
projectInputs.add(file);
|
|
78746
78833
|
resources.delete(file);
|
|
78747
78834
|
if (cached4[0] !== inputs2 || process.platform === "darwin" && cached4[1] !== developer) {
|
|
@@ -78751,15 +78838,15 @@ ${output}`
|
|
|
78751
78838
|
`${targetName}: Interface Builder compilation requires macOS and Xcode`
|
|
78752
78839
|
);
|
|
78753
78840
|
}
|
|
78754
|
-
|
|
78755
|
-
|
|
78756
|
-
|
|
78841
|
+
import_node_fs101.default.rmSync(output, { recursive: true, force: true });
|
|
78842
|
+
import_node_fs101.default.rmSync(stamp, { force: true });
|
|
78843
|
+
import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
|
|
78757
78844
|
(0, import_node_child_process47.execFileSync)("xcrun", ["ibtool", "--compile", output, file, ...args], {
|
|
78758
78845
|
cwd: project2.projectDir,
|
|
78759
78846
|
stdio: ["ignore", "pipe", "pipe"],
|
|
78760
78847
|
timeout: runScriptTimeoutMs
|
|
78761
78848
|
});
|
|
78762
|
-
|
|
78849
|
+
import_node_fs101.default.writeFileSync(stamp, `${inputs2}
|
|
78763
78850
|
${developer}
|
|
78764
78851
|
`);
|
|
78765
78852
|
}
|
|
@@ -78801,33 +78888,33 @@ ${developer}
|
|
|
78801
78888
|
function commonAncestor(dirs) {
|
|
78802
78889
|
let common2 = dirs[0];
|
|
78803
78890
|
for (const dir of dirs) {
|
|
78804
|
-
while (common2 !==
|
|
78805
|
-
common2 =
|
|
78891
|
+
while (common2 !== import_node_path105.default.dirname(common2) && import_node_path105.default.relative(common2, dir).startsWith(".."))
|
|
78892
|
+
common2 = import_node_path105.default.dirname(common2);
|
|
78806
78893
|
}
|
|
78807
78894
|
return common2;
|
|
78808
78895
|
}
|
|
78809
78896
|
function installedPodsSandbox(pods) {
|
|
78810
|
-
const podfileLock =
|
|
78811
|
-
const manifestLock =
|
|
78812
|
-
if (!
|
|
78897
|
+
const podfileLock = import_node_path105.default.join(import_node_path105.default.dirname(pods), "Podfile.lock");
|
|
78898
|
+
const manifestLock = import_node_path105.default.join(pods, "Manifest.lock");
|
|
78899
|
+
if (!import_node_fs101.default.existsSync(podfileLock))
|
|
78813
78900
|
throw new Error(
|
|
78814
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
78901
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
|
|
78815
78902
|
);
|
|
78816
|
-
if (!
|
|
78903
|
+
if (!import_node_fs101.default.existsSync(manifestLock) || !import_node_fs101.default.readFileSync(manifestLock).equals(import_node_fs101.default.readFileSync(podfileLock)))
|
|
78817
78904
|
throw new Error(
|
|
78818
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
78905
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
|
|
78819
78906
|
);
|
|
78820
78907
|
const specChecksums = {};
|
|
78821
|
-
const lines =
|
|
78908
|
+
const lines = import_node_fs101.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
78822
78909
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
78823
78910
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
78824
78911
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
78825
78912
|
if (!entry) break;
|
|
78826
78913
|
specChecksums[entry[1]] = entry[2];
|
|
78827
78914
|
}
|
|
78828
|
-
const specs =
|
|
78829
|
-
const generated =
|
|
78830
|
-
if (
|
|
78915
|
+
const specs = import_node_path105.default.join(pods, "Local Podspecs");
|
|
78916
|
+
const generated = import_node_path105.default.join(pods, POD_GRAPH_SPECIFICATIONS);
|
|
78917
|
+
if (import_node_fs101.default.existsSync(generated))
|
|
78831
78918
|
return {
|
|
78832
78919
|
podfileLock,
|
|
78833
78920
|
manifestLock,
|
|
@@ -78835,15 +78922,15 @@ function installedPodsSandbox(pods) {
|
|
|
78835
78922
|
localPodspecs: readPodGraphSpecifications(generated),
|
|
78836
78923
|
specificationFiles: [generated]
|
|
78837
78924
|
};
|
|
78838
|
-
const specificationFiles = isDirectory3(specs) ?
|
|
78925
|
+
const specificationFiles = isDirectory3(specs) ? import_node_fs101.default.readdirSync(specs).filter((name3) => name3.endsWith(".podspec.json")).sort().map((name3) => import_node_path105.default.join(specs, name3)) : [];
|
|
78839
78926
|
return {
|
|
78840
78927
|
podfileLock,
|
|
78841
78928
|
manifestLock,
|
|
78842
78929
|
specChecksums,
|
|
78843
78930
|
localPodspecs: new Map(
|
|
78844
78931
|
specificationFiles.map((file) => [
|
|
78845
|
-
|
|
78846
|
-
|
|
78932
|
+
import_node_path105.default.basename(file, ".podspec.json"),
|
|
78933
|
+
import_node_fs101.default.readFileSync(file, "utf8")
|
|
78847
78934
|
])
|
|
78848
78935
|
),
|
|
78849
78936
|
specificationFiles
|
|
@@ -78858,14 +78945,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
78858
78945
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
78859
78946
|
if (installedPods && isPodsProject(xcodeproj))
|
|
78860
78947
|
throw new Error(
|
|
78861
|
-
`${
|
|
78948
|
+
`${import_node_path105.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path105.default.dirname(import_node_path105.default.dirname(xcodeproj))}`
|
|
78862
78949
|
);
|
|
78863
78950
|
return;
|
|
78864
78951
|
}
|
|
78865
|
-
const key2 =
|
|
78866
|
-
if (projectAt.has(key2) || !installedPods && key2.split(
|
|
78952
|
+
const key2 = import_node_fs101.default.realpathSync.native(xcodeproj);
|
|
78953
|
+
if (projectAt.has(key2) || !installedPods && key2.split(import_node_path105.default.sep).includes("Pods"))
|
|
78867
78954
|
return;
|
|
78868
|
-
if (isPodsProject(key2)) cocoapods = installedPodsSandbox(
|
|
78955
|
+
if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path105.default.dirname(key2));
|
|
78869
78956
|
const project2 = loadProject(key2);
|
|
78870
78957
|
projectAt.set(key2, project2);
|
|
78871
78958
|
projects2.push(project2);
|
|
@@ -78881,12 +78968,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
78881
78968
|
for (const reference of listed)
|
|
78882
78969
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
78883
78970
|
if (projects2.length === 0) {
|
|
78884
|
-
throw new Error(`${
|
|
78971
|
+
throw new Error(`${import_node_path105.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
78885
78972
|
}
|
|
78886
|
-
const podfile =
|
|
78887
|
-
if (installedPods && !cocoapods &&
|
|
78973
|
+
const podfile = import_node_path105.default.join(import_node_path105.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
78974
|
+
if (installedPods && !cocoapods && import_node_fs101.default.existsSync(podfile))
|
|
78888
78975
|
throw new Error(
|
|
78889
|
-
`${podfile} is not installed into ${
|
|
78976
|
+
`${podfile} is not installed into ${import_node_path105.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path105.default.dirname(podfile)} and open the workspace it writes`
|
|
78890
78977
|
);
|
|
78891
78978
|
return { listed, projects: projects2, projectAt, cocoapods };
|
|
78892
78979
|
}
|
|
@@ -78923,7 +79010,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options2 = {}) {
|
|
|
78923
79010
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options2)).map((ref) => str2(ref.target.name) ?? ref.id);
|
|
78924
79011
|
}
|
|
78925
79012
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
78926
|
-
const project2 = loadProject(
|
|
79013
|
+
const project2 = loadProject(import_node_fs101.default.realpathSync.native(xcodeproj));
|
|
78927
79014
|
for (const [id, target] of Object.entries(project2.objects)) {
|
|
78928
79015
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
78929
79016
|
if (isIosAppTarget({ project: project2, id, target }, { requireSources: false }))
|
|
@@ -78931,7 +79018,7 @@ function defaultXcodeAppTarget(xcodeproj) {
|
|
|
78931
79018
|
}
|
|
78932
79019
|
}
|
|
78933
79020
|
function readXcodeExtensionTargets(input) {
|
|
78934
|
-
return workspaceProjects(
|
|
79021
|
+
return workspaceProjects(import_node_fs101.default.realpathSync.native(input)).projects.flatMap(
|
|
78935
79022
|
(project2) => projectTargets(project2).flatMap((ref) => {
|
|
78936
79023
|
if (ref.target.productType !== APP_EXTENSION) return [];
|
|
78937
79024
|
const name3 = str2(ref.target.name) ?? ref.id;
|
|
@@ -78948,7 +79035,7 @@ function readXcodeExtensionTargets(input) {
|
|
|
78948
79035
|
const infoFile = get2("INFOPLIST_FILE");
|
|
78949
79036
|
if (!infoFile) throw new Error(`${name3}: extension has no INFOPLIST_FILE`);
|
|
78950
79037
|
const info = parsePlist(
|
|
78951
|
-
|
|
79038
|
+
import_node_fs101.default.readFileSync(import_node_path105.default.resolve(project2.projectDir, infoFile), "utf8")
|
|
78952
79039
|
);
|
|
78953
79040
|
if (!isRecord(info))
|
|
78954
79041
|
throw new Error(`${name3}: extension Info.plist is not a dictionary`);
|
|
@@ -78971,30 +79058,30 @@ function readXcodeExtensionTargets(input) {
|
|
|
78971
79058
|
);
|
|
78972
79059
|
}
|
|
78973
79060
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
78974
|
-
const container =
|
|
79061
|
+
const container = import_node_fs101.default.realpathSync.native(xcodeprojOrWorkspace);
|
|
78975
79062
|
const { projects: projects2 } = workspaceProjects(container);
|
|
78976
79063
|
const containers = [
|
|
78977
79064
|
.../* @__PURE__ */ new Set([container, ...projects2.map((project3) => project3.xcodeproj)])
|
|
78978
79065
|
];
|
|
78979
79066
|
const found2 = containers.flatMap(
|
|
78980
79067
|
(dir) => [
|
|
78981
|
-
|
|
78982
|
-
...isDirectory3(
|
|
79068
|
+
import_node_path105.default.join(dir, "xcshareddata"),
|
|
79069
|
+
...isDirectory3(import_node_path105.default.join(dir, "xcuserdata")) ? import_node_fs101.default.readdirSync(import_node_path105.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path105.default.join(dir, "xcuserdata", user)) : []
|
|
78983
79070
|
].map((data) => ({
|
|
78984
79071
|
dir,
|
|
78985
|
-
file:
|
|
79072
|
+
file: import_node_path105.default.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
78986
79073
|
}))
|
|
78987
|
-
).find((candidate) =>
|
|
79074
|
+
).find((candidate) => import_node_fs101.default.existsSync(candidate.file));
|
|
78988
79075
|
if (!found2) {
|
|
78989
79076
|
const known = containers.flatMap(
|
|
78990
|
-
(dir) =>
|
|
79077
|
+
(dir) => import_node_fs101.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs101.default.readdirSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes")).filter((name4) => name4.endsWith(".xcscheme")).map((name4) => name4.slice(0, -".xcscheme".length)).sort() : []
|
|
78991
79078
|
);
|
|
78992
79079
|
throw new Error(
|
|
78993
|
-
`${
|
|
79080
|
+
`${import_node_path105.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
78994
79081
|
);
|
|
78995
79082
|
}
|
|
78996
79083
|
const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
78997
|
-
|
|
79084
|
+
import_node_fs101.default.readFileSync(found2.file, "utf8")
|
|
78998
79085
|
);
|
|
78999
79086
|
const attribute2 = (text7, name4) => {
|
|
79000
79087
|
const value = new RegExp(`\\b${name4}\\s*=\\s*"([^"]*)"`).exec(text7)?.[1];
|
|
@@ -79007,12 +79094,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
79007
79094
|
if (!configuration2 || !blueprint || !referenced?.startsWith("container:")) {
|
|
79008
79095
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
79009
79096
|
}
|
|
79010
|
-
const projectPath =
|
|
79011
|
-
|
|
79097
|
+
const projectPath = import_node_path105.default.resolve(
|
|
79098
|
+
import_node_path105.default.dirname(found2.dir),
|
|
79012
79099
|
referenced.slice("container:".length)
|
|
79013
79100
|
);
|
|
79014
79101
|
const project2 = projects2.find(
|
|
79015
|
-
(candidate) =>
|
|
79102
|
+
(candidate) => import_node_fs101.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs101.default.realpathSync.native(projectPath)
|
|
79016
79103
|
);
|
|
79017
79104
|
const target = project2 && projectTargets(project2).find((ref) => ref.id === blueprint);
|
|
79018
79105
|
const name3 = target && str2(target.target.name);
|
|
@@ -79030,26 +79117,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
79030
79117
|
return { target: name3, configuration: configuration2 };
|
|
79031
79118
|
}
|
|
79032
79119
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
79033
|
-
const nested =
|
|
79034
|
-
const iosRoot =
|
|
79035
|
-
const entries2 =
|
|
79120
|
+
const nested = import_node_path105.default.join(projectRoot, "ios");
|
|
79121
|
+
const iosRoot = import_node_fs101.default.existsSync(nested) ? nested : projectRoot;
|
|
79122
|
+
const entries2 = import_node_fs101.default.readdirSync(iosRoot, { withFileTypes: true });
|
|
79036
79123
|
const projects2 = (entries2.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
79037
|
-
xcodeproj:
|
|
79124
|
+
xcodeproj: import_node_path105.default.join(iosRoot, entry.name),
|
|
79038
79125
|
workspace: null
|
|
79039
79126
|
})) : entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
79040
|
-
const workspace =
|
|
79127
|
+
const workspace = import_node_path105.default.join(iosRoot, entry.name);
|
|
79041
79128
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
79042
79129
|
xcodeproj: xcodeproj2,
|
|
79043
79130
|
workspace
|
|
79044
79131
|
}));
|
|
79045
79132
|
}).filter(
|
|
79046
|
-
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(
|
|
79133
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path105.default.sep).includes("Pods") && import_node_fs101.default.existsSync(xcodeproj2)
|
|
79047
79134
|
).filter(
|
|
79048
79135
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
79049
79136
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
79050
79137
|
xcodeproj: xcodeproj2,
|
|
79051
79138
|
workspace,
|
|
79052
|
-
name:
|
|
79139
|
+
name: import_node_path105.default.basename(xcodeproj2)
|
|
79053
79140
|
}));
|
|
79054
79141
|
if (projects2.length === 0) return null;
|
|
79055
79142
|
if (projects2.length > 1 && !iosTarget) {
|
|
@@ -79088,13 +79175,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
79088
79175
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
79089
79176
|
if (!iosTarget) {
|
|
79090
79177
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
79091
|
-
const container =
|
|
79178
|
+
const container = import_node_fs101.default.existsSync(workspace) ? workspace : xcodeproj;
|
|
79092
79179
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
79093
|
-
if (
|
|
79180
|
+
if (import_node_fs101.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
79094
79181
|
return true;
|
|
79095
|
-
const users =
|
|
79096
|
-
return
|
|
79097
|
-
(user) =>
|
|
79182
|
+
const users = import_node_path105.default.join(dir, "xcuserdata");
|
|
79183
|
+
return import_node_fs101.default.existsSync(users) && import_node_fs101.default.readdirSync(users).some(
|
|
79184
|
+
(user) => import_node_fs101.default.existsSync(import_node_path105.default.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
79098
79185
|
);
|
|
79099
79186
|
});
|
|
79100
79187
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -79106,7 +79193,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
79106
79193
|
return { xcodeproj, target, workspace: project2.workspace };
|
|
79107
79194
|
}
|
|
79108
79195
|
async function resolveXcodeSwiftPackages(input, signal, target, configuration2) {
|
|
79109
|
-
if (
|
|
79196
|
+
if (import_node_fs101.default.existsSync(workspaceResolvedFile(import_node_fs101.default.realpathSync.native(input)))) return;
|
|
79110
79197
|
try {
|
|
79111
79198
|
readXcodeAppTarget(input, target, configuration2, {
|
|
79112
79199
|
installedPods: true,
|
|
@@ -79125,7 +79212,7 @@ async function resolveXcodeSwiftPackages(input, signal, target, configuration2)
|
|
|
79125
79212
|
function readXcodeAppTarget(input, targetName, configurationName, options2 = {}) {
|
|
79126
79213
|
if (isBazelPackage(input))
|
|
79127
79214
|
return readBazelAppTarget(input, targetName, configurationName, options2);
|
|
79128
|
-
const xcodeprojOrWorkspace =
|
|
79215
|
+
const xcodeprojOrWorkspace = import_node_fs101.default.realpathSync.native(input);
|
|
79129
79216
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
79130
79217
|
const { listed, projects: projects2, projectAt, cocoapods } = workspaceProjects(
|
|
79131
79218
|
xcodeprojOrWorkspace,
|
|
@@ -79136,7 +79223,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79136
79223
|
(ref) => options2.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") : isIosAppTarget(ref, options2) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
|
|
79137
79224
|
);
|
|
79138
79225
|
const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
|
|
79139
|
-
const container =
|
|
79226
|
+
const container = import_node_path105.default.basename(xcodeprojOrWorkspace);
|
|
79140
79227
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
79141
79228
|
if (named.length !== 1) {
|
|
79142
79229
|
if (options2.frameworkMachOType)
|
|
@@ -79165,15 +79252,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79165
79252
|
for (const ref of allTargets) {
|
|
79166
79253
|
const product = ref.project.object(str2(ref.target.productReference));
|
|
79167
79254
|
const file = str2(product?.path);
|
|
79168
|
-
if (file && !byProduct.has(
|
|
79169
|
-
byProduct.set(
|
|
79255
|
+
if (file && !byProduct.has(import_node_path105.default.basename(file)))
|
|
79256
|
+
byProduct.set(import_node_path105.default.basename(file), ref);
|
|
79170
79257
|
}
|
|
79171
79258
|
const proxied = (project2, proxyId) => {
|
|
79172
79259
|
const proxy = project2.object(proxyId);
|
|
79173
79260
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
79174
79261
|
const portal = str2(proxy.containerPortal);
|
|
79175
79262
|
const portalPath = project2.resolvePath(portal ?? "");
|
|
79176
|
-
const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath &&
|
|
79263
|
+
const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath && import_node_fs101.default.existsSync(portalPath) ? projectAt.get(import_node_fs101.default.realpathSync.native(portalPath)) : void 0;
|
|
79177
79264
|
const remote = str2(proxy.remoteGlobalIDString);
|
|
79178
79265
|
if (!owner || !remote) return void 0;
|
|
79179
79266
|
return projectTargets(owner).find(
|
|
@@ -79190,7 +79277,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79190
79277
|
const buildFile = project2.object(buildFileId);
|
|
79191
79278
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
79192
79279
|
const file = project2.object(str2(buildFile.fileRef));
|
|
79193
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
79280
|
+
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path105.default.basename(str2(file.path) ?? "")) : void 0;
|
|
79194
79281
|
if (resolved)
|
|
79195
79282
|
found2.push({
|
|
79196
79283
|
target: resolved,
|
|
@@ -79271,7 +79358,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79271
79358
|
const otherProduct = productName(other);
|
|
79272
79359
|
for (const { file, visibility } of headerPhase(other)) {
|
|
79273
79360
|
if (visibility === "Project") continue;
|
|
79274
|
-
const key2 = `${otherProduct}/${
|
|
79361
|
+
const key2 = `${otherProduct}/${import_node_path105.default.basename(file)}`;
|
|
79275
79362
|
if (!headers.has(key2)) headers.set(key2, file);
|
|
79276
79363
|
}
|
|
79277
79364
|
}
|
|
@@ -79301,8 +79388,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79301
79388
|
ref.project.visitMembers(
|
|
79302
79389
|
ref.id,
|
|
79303
79390
|
ref.project.resolvePath,
|
|
79304
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
79305
|
-
|
|
79391
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs101.default.existsSync(file) ? [file] : [],
|
|
79392
|
+
import_node_path105.default.join,
|
|
79306
79393
|
(file, kind) => {
|
|
79307
79394
|
if (kind === "header") found2.push(file);
|
|
79308
79395
|
}
|
|
@@ -79318,12 +79405,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79318
79405
|
for (const ref of projectTargets(project2)) {
|
|
79319
79406
|
const product = productName(ref);
|
|
79320
79407
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
79321
|
-
const name3 =
|
|
79408
|
+
const name3 = import_node_path105.default.basename(file);
|
|
79322
79409
|
if (!entries2.has(name3))
|
|
79323
79410
|
entries2.set(name3, visibility !== "Project" ? `${product}/${name3}` : file);
|
|
79324
79411
|
}
|
|
79325
79412
|
for (const file of synchronizedHeaders(ref)) {
|
|
79326
|
-
const name3 =
|
|
79413
|
+
const name3 = import_node_path105.default.basename(file);
|
|
79327
79414
|
if (!entries2.has(name3)) entries2.set(name3, file);
|
|
79328
79415
|
}
|
|
79329
79416
|
}
|
|
@@ -79333,7 +79420,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79333
79420
|
if (folder === null) continue;
|
|
79334
79421
|
for (const file of walkFiles(folder)) {
|
|
79335
79422
|
if (!HEADER_FILE.test(file)) continue;
|
|
79336
|
-
const name3 =
|
|
79423
|
+
const name3 = import_node_path105.default.basename(file);
|
|
79337
79424
|
if (!entries2.has(name3)) entries2.set(name3, file);
|
|
79338
79425
|
}
|
|
79339
79426
|
}
|
|
@@ -79341,18 +79428,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79341
79428
|
for (const id of Object.keys(project2.objects)) {
|
|
79342
79429
|
if (project2.object(id)?.isa !== "PBXFileReference") continue;
|
|
79343
79430
|
const file = project2.resolvePath(id);
|
|
79344
|
-
if (file && HEADER_FILE.test(file) && !entries2.has(
|
|
79345
|
-
entries2.set(
|
|
79431
|
+
if (file && HEADER_FILE.test(file) && !entries2.has(import_node_path105.default.basename(file)))
|
|
79432
|
+
entries2.set(import_node_path105.default.basename(file), file);
|
|
79346
79433
|
}
|
|
79347
79434
|
const map2 = [...entries2];
|
|
79348
79435
|
projectHeaderMaps.set(project2, map2);
|
|
79349
79436
|
return map2;
|
|
79350
79437
|
};
|
|
79351
79438
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
79352
|
-
const buildDir = (project2) =>
|
|
79439
|
+
const buildDir = (project2) => import_node_path105.default.join(project2.projectDir, ".build/peach-xcode/Build");
|
|
79353
79440
|
const workspaceBuild = {
|
|
79354
|
-
SYMROOT:
|
|
79355
|
-
OBJROOT:
|
|
79441
|
+
SYMROOT: import_node_path105.default.join(buildDir(app.project), "Products"),
|
|
79442
|
+
OBJROOT: import_node_path105.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
79356
79443
|
};
|
|
79357
79444
|
const moduleTarget = (ref) => {
|
|
79358
79445
|
const name3 = str2(ref.target.name) ?? ref.id;
|
|
@@ -79368,16 +79455,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79368
79455
|
TARGET_NAME: name3,
|
|
79369
79456
|
TARGETNAME: "$(TARGET_NAME)",
|
|
79370
79457
|
PROJECT: "$(PROJECT_NAME)",
|
|
79371
|
-
PROJECT_NAME:
|
|
79458
|
+
PROJECT_NAME: import_node_path105.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
79372
79459
|
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
79373
79460
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
79374
79461
|
SRCROOT: ref.project.projectDir,
|
|
79375
79462
|
SOURCE_ROOT: ref.project.projectDir,
|
|
79376
79463
|
PROJECT_DIR: ref.project.projectDir,
|
|
79377
|
-
SYMROOT:
|
|
79464
|
+
SYMROOT: import_node_path105.default.join(buildDir(ref.project), "Products"),
|
|
79378
79465
|
BUILD_DIR: "$(SYMROOT)",
|
|
79379
79466
|
BUILD_ROOT: "$(SYMROOT)",
|
|
79380
|
-
OBJROOT:
|
|
79467
|
+
OBJROOT: import_node_path105.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
79381
79468
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
79382
79469
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
79383
79470
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -79426,7 +79513,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79426
79513
|
xcconfigs
|
|
79427
79514
|
);
|
|
79428
79515
|
const searchRules = recursiveSearchRules(settings2);
|
|
79429
|
-
const absolute = (file) =>
|
|
79516
|
+
const absolute = (file) => import_node_path105.default.resolve(ref.project.projectDir, file);
|
|
79430
79517
|
const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
|
|
79431
79518
|
const product = settings2("PRODUCT_NAME");
|
|
79432
79519
|
const moduleName2 = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -79457,7 +79544,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79457
79544
|
`${name3}: Swift compatibility header phase has no Swift producer sources`
|
|
79458
79545
|
);
|
|
79459
79546
|
const building2 = options2.prepareGeneratedSources && options2.requireSources !== false;
|
|
79460
|
-
const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
79547
|
+
const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
79461
79548
|
if (versioning) {
|
|
79462
79549
|
const version2 = settings2("CURRENT_PROJECT_VERSION");
|
|
79463
79550
|
const custom = [
|
|
@@ -79470,7 +79557,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79470
79557
|
].filter((key2) => settings2(key2));
|
|
79471
79558
|
if (custom.length)
|
|
79472
79559
|
throw new Error(
|
|
79473
|
-
`${name3}: Xcode generates ${
|
|
79560
|
+
`${name3}: Xcode generates ${import_node_path105.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
79474
79561
|
);
|
|
79475
79562
|
const symbol2 = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
79476
79563
|
const [major, minor] = version2.split(".");
|
|
@@ -79483,9 +79570,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79483
79570
|
` const double ${symbol2}VersionNumber __attribute__ ((used)) = (double)${number4};`,
|
|
79484
79571
|
""
|
|
79485
79572
|
].join("\n");
|
|
79486
|
-
if (!
|
|
79487
|
-
|
|
79488
|
-
|
|
79573
|
+
if (!import_node_fs101.default.existsSync(versioning) || import_node_fs101.default.readFileSync(versioning, "utf8") !== unit2) {
|
|
79574
|
+
import_node_fs101.default.mkdirSync(import_node_path105.default.dirname(versioning), { recursive: true });
|
|
79575
|
+
import_node_fs101.default.writeFileSync(versioning, unit2);
|
|
79489
79576
|
}
|
|
79490
79577
|
allSources.push(versioning);
|
|
79491
79578
|
}
|
|
@@ -79504,7 +79591,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79504
79591
|
const headerFiles3 = headerPhase(ref);
|
|
79505
79592
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
79506
79593
|
for (const { file, visibility } of headerFiles3) {
|
|
79507
|
-
const name4 =
|
|
79594
|
+
const name4 = import_node_path105.default.basename(file);
|
|
79508
79595
|
const published4 = visibility !== "Project";
|
|
79509
79596
|
if (!ownHeaders.has(name4))
|
|
79510
79597
|
ownHeaders.set(name4, published4 ? `${product}/${name4}` : file);
|
|
@@ -79512,35 +79599,35 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79512
79599
|
ownHeaders.set(`${product}/${name4}`, file);
|
|
79513
79600
|
}
|
|
79514
79601
|
for (const file of synchronizedHeaders(ref)) {
|
|
79515
|
-
const name4 =
|
|
79602
|
+
const name4 = import_node_path105.default.basename(file);
|
|
79516
79603
|
if (ownHeaders.has(name4)) continue;
|
|
79517
79604
|
ownHeaders.set(name4, file);
|
|
79518
79605
|
const qualified3 = `${product}/${name4}`;
|
|
79519
79606
|
if (!ownHeaders.has(qualified3)) ownHeaders.set(qualified3, file);
|
|
79520
79607
|
}
|
|
79521
79608
|
const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
|
|
79522
|
-
const wrapper =
|
|
79523
|
-
const publicHeaders =
|
|
79609
|
+
const wrapper = import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
79610
|
+
const publicHeaders = import_node_path105.default.resolve(
|
|
79524
79611
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
79525
|
-
settings2("PUBLIC_HEADERS_FOLDER_PATH") ||
|
|
79612
|
+
settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "Headers")
|
|
79526
79613
|
);
|
|
79527
|
-
const privateHeaders =
|
|
79614
|
+
const privateHeaders = import_node_path105.default.resolve(
|
|
79528
79615
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
79529
|
-
settings2("PRIVATE_HEADERS_FOLDER_PATH") ||
|
|
79616
|
+
settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "PrivateHeaders")
|
|
79530
79617
|
);
|
|
79531
79618
|
const moduleMap2 = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
79532
|
-
const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ?
|
|
79533
|
-
const frameworkCompatibility = frameworkUmbrella && moduleMap2 &&
|
|
79619
|
+
const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ? import_node_path105.default.join(import_node_path105.default.dirname(moduleMap2), `${moduleName2}-umbrella.h`) : null;
|
|
79620
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap2 && import_node_fs101.default.existsSync(moduleMap2) && import_node_fs101.default.existsSync(frameworkUmbrella) ? {
|
|
79534
79621
|
framework: true,
|
|
79535
79622
|
moduleMap: moduleMap2,
|
|
79536
79623
|
umbrella: frameworkUmbrella,
|
|
79537
|
-
outputModuleMap:
|
|
79538
|
-
outputUmbrella:
|
|
79624
|
+
outputModuleMap: import_node_path105.default.join(wrapper, "Modules", "module.modulemap"),
|
|
79625
|
+
outputUmbrella: import_node_path105.default.join(
|
|
79539
79626
|
wrapper,
|
|
79540
79627
|
"Headers",
|
|
79541
|
-
|
|
79628
|
+
import_node_path105.default.basename(frameworkUmbrella)
|
|
79542
79629
|
),
|
|
79543
|
-
outputHeader:
|
|
79630
|
+
outputHeader: import_node_path105.default.join(
|
|
79544
79631
|
wrapper,
|
|
79545
79632
|
"Headers",
|
|
79546
79633
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName2}-Swift.h`
|
|
@@ -79554,10 +79641,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79554
79641
|
outputUmbrella: compatibility.outputUmbrella,
|
|
79555
79642
|
outputHeader: compatibility.outputHeader
|
|
79556
79643
|
} : frameworkCompatibility;
|
|
79557
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 &&
|
|
79644
|
+
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 && import_node_path105.default.relative(import_node_path105.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap2).split(import_node_path105.default.sep)[0] !== ".." && import_node_fs101.default.existsSync(moduleMap2) ? import_node_fs101.default.readdirSync(import_node_path105.default.dirname(moduleMap2)).flatMap((entry) => {
|
|
79558
79645
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
79559
|
-
const file =
|
|
79560
|
-
return
|
|
79646
|
+
const file = import_node_path105.default.join(import_node_path105.default.dirname(moduleMap2), entry);
|
|
79647
|
+
return import_node_fs101.default.existsSync(file) ? [file] : [];
|
|
79561
79648
|
}) : [];
|
|
79562
79649
|
const fileFlags = {};
|
|
79563
79650
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -79643,15 +79730,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79643
79730
|
// xcode searches its products' include directory before
|
|
79644
79731
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
79645
79732
|
headerSearchPaths: [
|
|
79646
|
-
|
|
79733
|
+
import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
79647
79734
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
79648
79735
|
(raw2) => expandSearchPath(absolute(raw2), searchRules)
|
|
79649
79736
|
),
|
|
79650
|
-
|
|
79737
|
+
import_node_path105.default.join(
|
|
79651
79738
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
79652
79739
|
settings2("CURRENT_ARCH")
|
|
79653
79740
|
),
|
|
79654
|
-
|
|
79741
|
+
import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
79655
79742
|
settings2("DERIVED_FILE_DIR")
|
|
79656
79743
|
],
|
|
79657
79744
|
userHeaderSearchPaths: settingList(
|
|
@@ -79701,9 +79788,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79701
79788
|
...headerFiles3.flatMap(
|
|
79702
79789
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
79703
79790
|
[
|
|
79704
|
-
|
|
79791
|
+
import_node_path105.default.join(
|
|
79705
79792
|
visibility === "Public" ? publicHeaders : privateHeaders,
|
|
79706
|
-
|
|
79793
|
+
import_node_path105.default.basename(file)
|
|
79707
79794
|
),
|
|
79708
79795
|
file
|
|
79709
79796
|
]
|
|
@@ -79725,17 +79812,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79725
79812
|
);
|
|
79726
79813
|
return file && HEADER_FILE.test(file) ? [
|
|
79727
79814
|
[
|
|
79728
|
-
|
|
79815
|
+
import_node_path105.default.resolve(
|
|
79729
79816
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
79730
79817
|
destination,
|
|
79731
|
-
|
|
79818
|
+
import_node_path105.default.basename(file)
|
|
79732
79819
|
),
|
|
79733
79820
|
file
|
|
79734
79821
|
]
|
|
79735
79822
|
] : [];
|
|
79736
79823
|
});
|
|
79737
79824
|
}),
|
|
79738
|
-
...moduleMap2 ? [[
|
|
79825
|
+
...moduleMap2 ? [[import_node_path105.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
|
|
79739
79826
|
]) : Object.fromEntries([
|
|
79740
79827
|
...podHeaders.map((file) => [file, file]),
|
|
79741
79828
|
...moduleMap2 ? [[moduleMap2, moduleMap2]] : []
|
|
@@ -79746,6 +79833,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79746
79833
|
};
|
|
79747
79834
|
};
|
|
79748
79835
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
79836
|
+
const xcframeworkCopies = builtTargets.flatMap(
|
|
79837
|
+
({ ref, settings: settings2 }) => list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
79838
|
+
const phase = ref.project.object(phaseId);
|
|
79839
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy XCFrameworks")
|
|
79840
|
+
return [];
|
|
79841
|
+
const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
|
|
79842
|
+
const files2 = (paths, lists) => [
|
|
79843
|
+
...list(paths).map(absolute),
|
|
79844
|
+
...list(lists).flatMap((raw2) => {
|
|
79845
|
+
const file = absolute(raw2);
|
|
79846
|
+
if (!import_node_fs101.default.existsSync(file)) return [];
|
|
79847
|
+
xcconfigs.add(file);
|
|
79848
|
+
return fileListEntries(file, absolute);
|
|
79849
|
+
})
|
|
79850
|
+
];
|
|
79851
|
+
const destinations = new Set(
|
|
79852
|
+
files2(phase.outputPaths, phase.outputFileListPaths).map(
|
|
79853
|
+
(file) => import_node_path105.default.dirname(file)
|
|
79854
|
+
)
|
|
79855
|
+
);
|
|
79856
|
+
const slices = files2(phase.inputPaths, phase.inputFileListPaths).flatMap(
|
|
79857
|
+
(file) => file.endsWith(".xcframework") && import_node_fs101.default.existsSync(file) ? [simulatorNativeLibrary(file)?.slice ?? []].flat() : []
|
|
79858
|
+
);
|
|
79859
|
+
return destinations.size === 1 && slices.length > 0 ? [{ destination: [...destinations][0], slices }] : [];
|
|
79860
|
+
})
|
|
79861
|
+
);
|
|
79862
|
+
const copiedSearchPath = (directory2) => {
|
|
79863
|
+
for (const { destination, slices } of xcframeworkCopies) {
|
|
79864
|
+
const rest = relativeInside(destination, directory2);
|
|
79865
|
+
if (rest === null) continue;
|
|
79866
|
+
const found2 = slices.map((slice) => import_node_path105.default.join(slice, rest)).filter((candidate) => isDirectory3(candidate));
|
|
79867
|
+
if (found2.length) return found2;
|
|
79868
|
+
}
|
|
79869
|
+
return [directory2];
|
|
79870
|
+
};
|
|
79871
|
+
if (xcframeworkCopies.length)
|
|
79872
|
+
for (const { module: module3 } of builtTargets) {
|
|
79873
|
+
const objc = module3.objc;
|
|
79874
|
+
if (!objc) continue;
|
|
79875
|
+
objc.headerSearchPaths = objc.headerSearchPaths.flatMap(copiedSearchPath);
|
|
79876
|
+
objc.userHeaderSearchPaths = objc.userHeaderSearchPaths.flatMap(copiedSearchPath);
|
|
79877
|
+
objc.frameworkSearchPaths = objc.frameworkSearchPaths.flatMap(copiedSearchPath);
|
|
79878
|
+
}
|
|
79749
79879
|
for (const { ref, module: module3, settings: settings2 } of builtTargets)
|
|
79750
79880
|
module3.targetDependencies = [
|
|
79751
79881
|
.../* @__PURE__ */ new Set([
|
|
@@ -79774,7 +79904,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79774
79904
|
const generate = settings2("GENERATE_INFOPLIST_FILE") === "YES";
|
|
79775
79905
|
if (!FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") || !plistSetting && !generate || module3.generatedInfoPlist && !options2.prepareGeneratedSources)
|
|
79776
79906
|
return { ref, framework: module3 };
|
|
79777
|
-
const file = plistSetting ?
|
|
79907
|
+
const file = plistSetting ? import_node_path105.default.resolve(ref.project.projectDir, plistSetting) : null;
|
|
79778
79908
|
if (file) xcconfigs.add(file);
|
|
79779
79909
|
const info2 = processedInfoPlist(module3.name, file, productSettings2, keys);
|
|
79780
79910
|
if (generate) {
|
|
@@ -79790,7 +79920,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79790
79920
|
});
|
|
79791
79921
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
79792
79922
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
79793
|
-
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) =>
|
|
79923
|
+
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path105.default.dirname(file)).filter((dir) => import_node_fs101.default.existsSync(dir)) : []
|
|
79794
79924
|
);
|
|
79795
79925
|
const resourceProducts = [];
|
|
79796
79926
|
const bundleTargets = builtTargets.filter(
|
|
@@ -79801,7 +79931,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79801
79931
|
const phase = owner.ref.project.object(phaseId);
|
|
79802
79932
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
|
|
79803
79933
|
continue;
|
|
79804
|
-
const absolute = (raw2) =>
|
|
79934
|
+
const absolute = (raw2) => import_node_path105.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
|
|
79805
79935
|
const entries2 = (paths) => paths.flatMap((raw2) => {
|
|
79806
79936
|
const file = absolute(raw2);
|
|
79807
79937
|
xcconfigs.add(file);
|
|
@@ -79817,7 +79947,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79817
79947
|
].filter((file) => file.endsWith(".bundle"));
|
|
79818
79948
|
if (inputs2.length !== outputs.length)
|
|
79819
79949
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
79820
|
-
const destinationRoot =
|
|
79950
|
+
const destinationRoot = import_node_path105.default.join(
|
|
79821
79951
|
owner.settings("TARGET_BUILD_DIR"),
|
|
79822
79952
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
79823
79953
|
);
|
|
@@ -79826,24 +79956,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79826
79956
|
const file = str2(
|
|
79827
79957
|
target.ref.project.object(str2(target.ref.target.productReference))?.path
|
|
79828
79958
|
);
|
|
79829
|
-
return file &&
|
|
79959
|
+
return file && import_node_path105.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
79830
79960
|
});
|
|
79831
79961
|
if (!product && !isDirectory3(input2))
|
|
79832
79962
|
throw new Error(
|
|
79833
79963
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
79834
79964
|
);
|
|
79835
|
-
const destination =
|
|
79836
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
79965
|
+
const destination = import_node_path105.default.relative(destinationRoot, outputs[index]);
|
|
79966
|
+
if (destination === ".." || destination.startsWith(`..${import_node_path105.default.sep}`) || import_node_path105.default.isAbsolute(destination) || import_node_path105.default.basename(input2) !== import_node_path105.default.basename(destination))
|
|
79837
79967
|
throw new Error(
|
|
79838
79968
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
79839
79969
|
);
|
|
79840
|
-
const infoFile = product ?
|
|
79970
|
+
const infoFile = product ? import_node_path105.default.resolve(
|
|
79841
79971
|
product.ref.project.projectDir,
|
|
79842
79972
|
product.settings("INFOPLIST_FILE")
|
|
79843
79973
|
) : null;
|
|
79844
79974
|
if (infoFile) xcconfigs.add(infoFile);
|
|
79845
79975
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
79846
|
-
const bundlePath = prefix + destination.split(
|
|
79976
|
+
const bundlePath = prefix + destination.split(import_node_path105.default.sep).join("/");
|
|
79847
79977
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
79848
79978
|
throw new Error(
|
|
79849
79979
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -79854,20 +79984,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79854
79984
|
resources: product.module.resources,
|
|
79855
79985
|
infoPlist: buildPlist(
|
|
79856
79986
|
expandValue(
|
|
79857
|
-
parsePlist(
|
|
79987
|
+
parsePlist(import_node_fs101.default.readFileSync(infoFile, "utf8")),
|
|
79858
79988
|
product.productSettings
|
|
79859
79989
|
)
|
|
79860
79990
|
)
|
|
79861
79991
|
} : {
|
|
79862
|
-
resources:
|
|
79992
|
+
resources: import_node_fs101.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path105.default.join(entry.parentPath, entry.name)).sort(),
|
|
79863
79993
|
sourceRoot: input2
|
|
79864
79994
|
}
|
|
79865
79995
|
});
|
|
79866
79996
|
}
|
|
79867
79997
|
}
|
|
79868
79998
|
}
|
|
79869
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
79870
|
-
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ?
|
|
79999
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path105.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
80000
|
+
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path105.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
|
|
79871
80001
|
const infoPlistPending = module2.generatedInfoPlist && !options2.prepareGeneratedSources;
|
|
79872
80002
|
const info = processedInfoPlist(
|
|
79873
80003
|
module2.name,
|
|
@@ -79876,7 +80006,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79876
80006
|
settingKeys
|
|
79877
80007
|
);
|
|
79878
80008
|
const bundleIdentifier = productSettings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
|
|
79879
|
-
const entitlements = entitlementsFile ? parsePlist(
|
|
80009
|
+
const entitlements = entitlementsFile ? parsePlist(import_node_fs101.default.readFileSync(entitlementsFile, "utf8")) : void 0;
|
|
79880
80010
|
const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
|
|
79881
80011
|
entitlements,
|
|
79882
80012
|
(value) => expand(value, (key2) => {
|
|
@@ -79914,7 +80044,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79914
80044
|
};
|
|
79915
80045
|
}
|
|
79916
80046
|
const localPackageDirs = [
|
|
79917
|
-
...listed.filter((reference) =>
|
|
80047
|
+
...listed.filter((reference) => import_node_fs101.default.existsSync(import_node_path105.default.join(reference, "Package.swift"))),
|
|
79918
80048
|
...projects2.flatMap(
|
|
79919
80049
|
(project2) => Object.entries(project2.objects).flatMap(([id, entry]) => {
|
|
79920
80050
|
if (!isDict(entry)) return [];
|
|
@@ -79924,19 +80054,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79924
80054
|
const packages = [];
|
|
79925
80055
|
while (pending2.length > 0) {
|
|
79926
80056
|
const dir = pending2.pop();
|
|
79927
|
-
if (
|
|
80057
|
+
if (import_node_fs101.default.existsSync(import_node_path105.default.join(dir, "Package.swift"))) {
|
|
79928
80058
|
packages.push(dir);
|
|
79929
80059
|
continue;
|
|
79930
80060
|
}
|
|
79931
80061
|
if (!isDirectory3(dir)) continue;
|
|
79932
|
-
for (const child of
|
|
80062
|
+
for (const child of import_node_fs101.default.readdirSync(dir, { withFileTypes: true }))
|
|
79933
80063
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
79934
|
-
pending2.push(
|
|
80064
|
+
pending2.push(import_node_path105.default.join(dir, child.name));
|
|
79935
80065
|
}
|
|
79936
80066
|
return packages;
|
|
79937
80067
|
}
|
|
79938
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
79939
|
-
return candidate &&
|
|
80068
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path105.default.resolve(project2.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project2.resolvePath(id) : null;
|
|
80069
|
+
return candidate && import_node_fs101.default.existsSync(import_node_path105.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
79940
80070
|
})
|
|
79941
80071
|
)
|
|
79942
80072
|
];
|
|
@@ -79966,7 +80096,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79966
80096
|
if ((flag === "-framework" || flag === "-weak_framework") && name3)
|
|
79967
80097
|
sdkFrameworks.add(name3);
|
|
79968
80098
|
});
|
|
79969
|
-
const absolute = (raw2) =>
|
|
80099
|
+
const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
|
|
79970
80100
|
const requested = options2.nativeModules;
|
|
79971
80101
|
const includeBinary = (name3, dir) => {
|
|
79972
80102
|
if (!requested || nativeTargets2.has(ref) || requested.includes(name3) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
|
|
@@ -79978,14 +80108,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79978
80108
|
for (const directory2 of expandSearchPath(absolute(raw2), searchRules)) {
|
|
79979
80109
|
if (frameworkSearchDirectories.has(directory2)) continue;
|
|
79980
80110
|
frameworkSearchDirectories.add(directory2);
|
|
79981
|
-
if (!
|
|
80111
|
+
if (!import_node_fs101.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
|
|
79982
80112
|
continue;
|
|
79983
|
-
for (const entry of
|
|
80113
|
+
for (const entry of import_node_fs101.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
79984
80114
|
const name3 = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
79985
80115
|
if (!name3 || byProduct.has(entry.name) || searchedFrameworks.has(name3))
|
|
79986
80116
|
continue;
|
|
79987
|
-
const file =
|
|
79988
|
-
if (
|
|
80117
|
+
const file = import_node_path105.default.join(directory2, entry.name);
|
|
80118
|
+
if (import_node_fs101.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
79989
80119
|
searchedFrameworks.set(name3, file);
|
|
79990
80120
|
}
|
|
79991
80121
|
}
|
|
@@ -79993,9 +80123,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
79993
80123
|
}
|
|
79994
80124
|
for (const raw2 of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
79995
80125
|
const dir = absolute(raw2);
|
|
79996
|
-
const modulemap =
|
|
79997
|
-
if (!
|
|
79998
|
-
const name3 = moduleMapName(
|
|
80126
|
+
const modulemap = import_node_path105.default.join(dir, "module.modulemap");
|
|
80127
|
+
if (!import_node_fs101.default.existsSync(modulemap)) continue;
|
|
80128
|
+
const name3 = moduleMapName(import_node_fs101.default.readFileSync(modulemap, "utf8"));
|
|
79999
80129
|
if (name3 && !binaryFrameworks.has(name3)) includeBinary(name3, dir);
|
|
80000
80130
|
}
|
|
80001
80131
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -80004,7 +80134,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80004
80134
|
const inputs2 = list(phase.inputPaths).map(absolute);
|
|
80005
80135
|
for (const raw2 of list(phase.inputFileListPaths)) {
|
|
80006
80136
|
const file = absolute(raw2);
|
|
80007
|
-
if (!
|
|
80137
|
+
if (!import_node_fs101.default.existsSync(file)) continue;
|
|
80008
80138
|
xcconfigs.add(file);
|
|
80009
80139
|
inputs2.push(...fileListEntries(file, absolute));
|
|
80010
80140
|
}
|
|
@@ -80069,7 +80199,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80069
80199
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
80070
80200
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
80071
80201
|
kind: "local",
|
|
80072
|
-
dir:
|
|
80202
|
+
dir: import_node_path105.default.resolve(
|
|
80073
80203
|
project2.projectDir,
|
|
80074
80204
|
str2(reference.relativePath) ?? ""
|
|
80075
80205
|
)
|
|
@@ -80103,14 +80233,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80103
80233
|
continue;
|
|
80104
80234
|
}
|
|
80105
80235
|
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
80106
|
-
byProduct.has(
|
|
80236
|
+
byProduct.has(import_node_path105.default.basename(rawPath)))
|
|
80107
80237
|
continue;
|
|
80108
80238
|
const resolved = fileId ? project2.resolvePath(fileId) : null;
|
|
80109
|
-
if (fileId && resolved !== null && !
|
|
80110
|
-
const parts2 = resolved.split(
|
|
80239
|
+
if (fileId && resolved !== null && !import_node_fs101.default.existsSync(resolved)) {
|
|
80240
|
+
const parts2 = resolved.split(import_node_path105.default.sep);
|
|
80111
80241
|
const pods = parts2.lastIndexOf("Pods");
|
|
80112
|
-
const sandbox = parts2.slice(0, pods + 1).join(
|
|
80113
|
-
if (!options2.installedPods && options2.requireSources === false && pods > 0 &&
|
|
80242
|
+
const sandbox = parts2.slice(0, pods + 1).join(import_node_path105.default.sep);
|
|
80243
|
+
if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs101.default.existsSync(import_node_path105.default.join(import_node_path105.default.dirname(sandbox), "Podfile")))
|
|
80114
80244
|
continue;
|
|
80115
80245
|
if (!ios_sdk_frameworks_default.frameworks.includes(name3))
|
|
80116
80246
|
throw new Error(
|
|
@@ -80138,7 +80268,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80138
80268
|
({ product }) => !options2.nativeModules || nativeTargets2.has(built2.ref) || options2.nativeModules.includes(product)
|
|
80139
80269
|
);
|
|
80140
80270
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
80141
|
-
let packageResolved =
|
|
80271
|
+
let packageResolved = import_node_fs101.default.existsSync(resolvedFile) ? [import_node_fs101.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path105.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs101.default.existsSync(file)).map((file) => import_node_fs101.default.realpathSync.native(file)).sort();
|
|
80142
80272
|
if (packageResolved.length === 0) {
|
|
80143
80273
|
const requirements = remotePackageRequirements(projects2);
|
|
80144
80274
|
if (requirements.length > 0) {
|
|
@@ -80194,19 +80324,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80194
80324
|
} : {},
|
|
80195
80325
|
rootDir: commonAncestor(
|
|
80196
80326
|
[
|
|
80197
|
-
workspace ?
|
|
80327
|
+
workspace ? import_node_path105.default.dirname(workspace) : app.project.projectDir,
|
|
80198
80328
|
...used.map((project2) => project2.projectDir),
|
|
80199
80329
|
...localPackageDirs,
|
|
80200
80330
|
...linkedProducts.flatMap(
|
|
80201
|
-
({ source }) => source.kind === "local" &&
|
|
80331
|
+
({ source }) => source.kind === "local" && import_node_fs101.default.existsSync(source.dir) ? [source.dir] : []
|
|
80202
80332
|
),
|
|
80203
80333
|
...new Set(podSourceDirs),
|
|
80204
80334
|
// a target's own files may sit beside the project, such as an asset
|
|
80205
80335
|
// catalog one folder up, and xcode builds them from there
|
|
80206
80336
|
...new Set(
|
|
80207
|
-
[...module2.allSources, ...module2.resources].filter((file) =>
|
|
80337
|
+
[...module2.allSources, ...module2.resources].filter((file) => import_node_fs101.default.existsSync(file)).map((file) => import_node_path105.default.dirname(file))
|
|
80208
80338
|
)
|
|
80209
|
-
].map((dir) =>
|
|
80339
|
+
].map((dir) => import_node_fs101.default.realpathSync.native(dir))
|
|
80210
80340
|
),
|
|
80211
80341
|
projectFiles: [
|
|
80212
80342
|
.../* @__PURE__ */ new Set([
|
|
@@ -80232,7 +80362,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80232
80362
|
resourceProducts,
|
|
80233
80363
|
linkedProducts,
|
|
80234
80364
|
localPackageDirs: [
|
|
80235
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
80365
|
+
...new Set(localPackageDirs.map((dir) => import_node_fs101.default.realpathSync.native(dir)))
|
|
80236
80366
|
].sort(),
|
|
80237
80367
|
binaryFrameworks: [...binaryFrameworks].map(([name3, file]) => ({ name: name3, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
80238
80368
|
sdkFrameworks: [...sdkFrameworks].filter(
|
|
@@ -80245,15 +80375,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
80245
80375
|
cocoapods
|
|
80246
80376
|
};
|
|
80247
80377
|
}
|
|
80248
|
-
var import_node_child_process47, import_node_crypto60,
|
|
80378
|
+
var import_node_child_process47, import_node_crypto60, import_node_fs101, import_node_module9, import_node_path105, XCODE_DEFAULT_IOS_DEPLOYMENT_TARGET, runScriptTimeoutMs, CXX_STANDARD_ALIASES, PRE_CXX20_STANDARDS, APPLICATION, APP_EXTENSION, RESOURCE_BUNDLE, PRODUCT_MACH_O_TYPES, FRAMEWORK_PRODUCTS, HEADER_FILE, MODULE_PRODUCTS, CONDITIONS, isDirectory3, loaded3, developerDir, preparedSourcePhases, isPodsProject, targetRefs, NativeAppTargetSelectionError, workspaceResolvedFile, SwiftPackageResolutionRequired;
|
|
80249
80379
|
var init_xcode_project = __esm({
|
|
80250
80380
|
"src/xcode-project.ts"() {
|
|
80251
80381
|
"use strict";
|
|
80252
80382
|
import_node_child_process47 = require("node:child_process");
|
|
80253
80383
|
import_node_crypto60 = require("node:crypto");
|
|
80254
|
-
|
|
80384
|
+
import_node_fs101 = __toESM(require("node:fs"), 1);
|
|
80255
80385
|
import_node_module9 = require("node:module");
|
|
80256
|
-
|
|
80386
|
+
import_node_path105 = __toESM(require("node:path"), 1);
|
|
80257
80387
|
init_bazel_project();
|
|
80258
80388
|
init_ios_sdk_frameworks();
|
|
80259
80389
|
init_is_record();
|
|
@@ -80265,7 +80395,9 @@ var init_xcode_project = __esm({
|
|
|
80265
80395
|
init_swift_distribution();
|
|
80266
80396
|
init_swift_native_pin();
|
|
80267
80397
|
init_swift_package();
|
|
80398
|
+
init_swift_source_file();
|
|
80268
80399
|
init_swift_toolchain();
|
|
80400
|
+
init_swift_xcframework();
|
|
80269
80401
|
init_xcode_intents();
|
|
80270
80402
|
init_xcode_json_project();
|
|
80271
80403
|
init_xcode_swift_features();
|
|
@@ -80318,15 +80450,15 @@ var init_xcode_project = __esm({
|
|
|
80318
80450
|
arch: "arm64",
|
|
80319
80451
|
variant: "normal"
|
|
80320
80452
|
};
|
|
80321
|
-
isDirectory3 = (dir) =>
|
|
80453
|
+
isDirectory3 = (dir) => import_node_fs101.default.existsSync(dir) && import_node_fs101.default.statSync(dir).isDirectory();
|
|
80322
80454
|
loaded3 = /* @__PURE__ */ new Map();
|
|
80323
80455
|
preparedSourcePhases = /* @__PURE__ */ new Map();
|
|
80324
|
-
isPodsProject = (xcodeproj) =>
|
|
80456
|
+
isPodsProject = (xcodeproj) => import_node_path105.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path105.default.basename(import_node_path105.default.dirname(xcodeproj)) === "Pods";
|
|
80325
80457
|
targetRefs = /* @__PURE__ */ new WeakMap();
|
|
80326
80458
|
NativeAppTargetSelectionError = class extends Error {
|
|
80327
80459
|
};
|
|
80328
|
-
workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
80329
|
-
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace :
|
|
80460
|
+
workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path105.default.join(
|
|
80461
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path105.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
80330
80462
|
"xcshareddata",
|
|
80331
80463
|
"swiftpm",
|
|
80332
80464
|
"Package.resolved"
|
|
@@ -80362,7 +80494,7 @@ function workspacePackageManager(root, declared, excluded) {
|
|
|
80362
80494
|
{ manager: "yarn", files: ["yarn.lock"] },
|
|
80363
80495
|
{ manager: "npm", files: ["package-lock.json"] }
|
|
80364
80496
|
].filter(
|
|
80365
|
-
({ files: files2 }) => files2.some((file) => !excluded(file) &&
|
|
80497
|
+
({ files: files2 }) => files2.some((file) => !excluded(file) && import_node_fs102.default.existsSync(import_node_path106.default.join(root, file)))
|
|
80366
80498
|
);
|
|
80367
80499
|
if (locks.length !== 1) return manager;
|
|
80368
80500
|
const lockedManager = locks[0].manager;
|
|
@@ -80376,9 +80508,9 @@ function pinnedNodeVersion(root, manifest) {
|
|
|
80376
80508
|
return exactVersionFile(root, ".nvmrc") ?? exactVersionFile(root, ".node-version");
|
|
80377
80509
|
}
|
|
80378
80510
|
function exactVersionFile(root, name3) {
|
|
80379
|
-
const file =
|
|
80380
|
-
if (!
|
|
80381
|
-
const version2 =
|
|
80511
|
+
const file = import_node_path106.default.join(root, name3);
|
|
80512
|
+
if (!import_node_fs102.default.existsSync(file)) return null;
|
|
80513
|
+
const version2 = import_node_fs102.default.readFileSync(file, "utf8").trim().replace(/^v/, "");
|
|
80382
80514
|
return EXACT_VERSION.test(version2) ? version2 : null;
|
|
80383
80515
|
}
|
|
80384
80516
|
async function hashExpoWorkspace(app, signal) {
|
|
@@ -80390,15 +80522,15 @@ async function hashExpoSourceWorkspace(app, signal) {
|
|
|
80390
80522
|
return { root, hash };
|
|
80391
80523
|
}
|
|
80392
80524
|
function pnpmStoreArgs(root) {
|
|
80393
|
-
const modules =
|
|
80394
|
-
if (!
|
|
80525
|
+
const modules = import_node_path106.default.join(root, "node_modules", ".modules.yaml");
|
|
80526
|
+
if (!import_node_fs102.default.existsSync(modules)) return [];
|
|
80395
80527
|
const store = /^\s*"?storeDir"?:\s*["']?([^"'\n,]+)/m.exec(
|
|
80396
|
-
|
|
80528
|
+
import_node_fs102.default.readFileSync(modules, "utf8")
|
|
80397
80529
|
);
|
|
80398
80530
|
return store ? ["--store-dir", store[1]] : [];
|
|
80399
80531
|
}
|
|
80400
80532
|
function linkedPackageDirectories(root, app) {
|
|
80401
|
-
const appRelative =
|
|
80533
|
+
const appRelative = import_node_path106.default.relative(root, app);
|
|
80402
80534
|
return localPackageDirectories(root, app).filter(
|
|
80403
80535
|
(directory2) => directory2 !== "" && directory2 !== appRelative
|
|
80404
80536
|
);
|
|
@@ -80406,11 +80538,11 @@ function linkedPackageDirectories(root, app) {
|
|
|
80406
80538
|
function localPackageDirectories(root, app) {
|
|
80407
80539
|
const directories = /* @__PURE__ */ new Set();
|
|
80408
80540
|
const visit3 = (directory2) => {
|
|
80409
|
-
const relative6 =
|
|
80541
|
+
const relative6 = import_node_path106.default.relative(root, directory2);
|
|
80410
80542
|
if (directories.has(relative6)) return;
|
|
80411
80543
|
directories.add(relative6);
|
|
80412
80544
|
const manifest = JSON.parse(
|
|
80413
|
-
|
|
80545
|
+
import_node_fs102.default.readFileSync(import_node_path106.default.join(directory2, "package.json"), "utf8")
|
|
80414
80546
|
);
|
|
80415
80547
|
for (const name3 of Object.keys({
|
|
80416
80548
|
...manifest.dependencies,
|
|
@@ -80418,12 +80550,12 @@ function localPackageDirectories(root, app) {
|
|
|
80418
80550
|
...manifest.peerDependencies,
|
|
80419
80551
|
...manifest.optionalDependencies
|
|
80420
80552
|
})) {
|
|
80421
|
-
for (let at = directory2; ; at =
|
|
80422
|
-
const link =
|
|
80423
|
-
if (
|
|
80424
|
-
const target =
|
|
80425
|
-
const within2 =
|
|
80426
|
-
if (!within2.startsWith("..") && !within2.split(
|
|
80553
|
+
for (let at = directory2; ; at = import_node_path106.default.dirname(at)) {
|
|
80554
|
+
const link = import_node_path106.default.join(at, "node_modules", name3);
|
|
80555
|
+
if (import_node_fs102.default.existsSync(link)) {
|
|
80556
|
+
const target = import_node_fs102.default.realpathSync(link);
|
|
80557
|
+
const within2 = import_node_path106.default.relative(root, target);
|
|
80558
|
+
if (!within2.startsWith("..") && !within2.split(import_node_path106.default.sep).includes("node_modules") && import_node_fs102.default.existsSync(import_node_path106.default.join(target, "package.json")))
|
|
80427
80559
|
visit3(target);
|
|
80428
80560
|
break;
|
|
80429
80561
|
}
|
|
@@ -80435,7 +80567,7 @@ function localPackageDirectories(root, app) {
|
|
|
80435
80567
|
return [...directories];
|
|
80436
80568
|
}
|
|
80437
80569
|
async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, podsEnvironment = reactNativePodsEnvironment()) {
|
|
80438
|
-
app =
|
|
80570
|
+
app = import_node_fs102.default.realpathSync(app);
|
|
80439
80571
|
const key2 = JSON.stringify([app, everyByte, sourceOnly, podsEnvironment]);
|
|
80440
80572
|
let pending2 = hashing.get(key2);
|
|
80441
80573
|
if (!pending2) {
|
|
@@ -80455,22 +80587,22 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
80455
80587
|
sourceOnly,
|
|
80456
80588
|
linkedPackageDirectories(root, app)
|
|
80457
80589
|
);
|
|
80458
|
-
const appRelative =
|
|
80459
|
-
const manifest = JSON.parse(
|
|
80590
|
+
const appRelative = import_node_path106.default.relative(root, app);
|
|
80591
|
+
const manifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
|
|
80460
80592
|
const hash = (0, import_node_crypto61.createHash)("sha256");
|
|
80461
80593
|
const native = (0, import_node_crypto61.createHash)("sha256");
|
|
80462
80594
|
const nativeDirectories = localPackageDirectories(root, app);
|
|
80463
80595
|
const versionFree = new Set(
|
|
80464
80596
|
nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
|
|
80465
|
-
(directory2) => !
|
|
80466
|
-
).map((directory2) => directory2.split(
|
|
80597
|
+
(directory2) => !import_node_fs102.default.readdirSync(import_node_path106.default.join(root, directory2)).some((name3) => NATIVE_PACKAGE_ENTRY.test(name3))
|
|
80598
|
+
).map((directory2) => directory2.split(import_node_path106.default.sep).join("/"))
|
|
80467
80599
|
);
|
|
80468
80600
|
const versioned = new Set(
|
|
80469
|
-
nativeDirectories.map((directory2) => directory2.split(
|
|
80601
|
+
nativeDirectories.map((directory2) => directory2.split(import_node_path106.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
|
|
80470
80602
|
);
|
|
80471
80603
|
const nativeConfigBytes = (posix2, bytes) => {
|
|
80472
|
-
const directory2 =
|
|
80473
|
-
if (
|
|
80604
|
+
const directory2 = import_node_path106.default.posix.dirname(posix2);
|
|
80605
|
+
if (import_node_path106.default.posix.basename(posix2) === "package.json" && versionFree.has(directory2)) {
|
|
80474
80606
|
const { version: _version, ...manifest2 } = JSON.parse(bytes.toString("utf8"));
|
|
80475
80607
|
return JSON.stringify(manifest2);
|
|
80476
80608
|
}
|
|
@@ -80484,21 +80616,21 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
80484
80616
|
return !(workspaces && entry && !versioned.has(entry) && /^ {6}"version": "[^"]*",$/.test(line));
|
|
80485
80617
|
}).join("\n");
|
|
80486
80618
|
};
|
|
80487
|
-
const steersNative = (relative6) => !relative6.includes(
|
|
80488
|
-
(directory2) => directory2 === "" || relative6 === directory2 || relative6.startsWith(directory2 +
|
|
80619
|
+
const steersNative = (relative6) => !relative6.includes(import_node_path106.default.sep) || relative6.startsWith(`patches${import_node_path106.default.sep}`) || relative6.startsWith(import_node_path106.default.join("scripts", "lib", "expo-plugins") + import_node_path106.default.sep) || nativeDirectories.some(
|
|
80620
|
+
(directory2) => directory2 === "" || relative6 === directory2 || relative6.startsWith(directory2 + import_node_path106.default.sep)
|
|
80489
80621
|
);
|
|
80490
80622
|
const steps = [];
|
|
80491
80623
|
const unread = [];
|
|
80492
80624
|
const walk4 = (directory2) => {
|
|
80493
|
-
const entries2 =
|
|
80625
|
+
const entries2 = import_node_fs102.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
80494
80626
|
for (const entry of entries2) {
|
|
80495
|
-
const file =
|
|
80496
|
-
const relative6 =
|
|
80627
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
80628
|
+
const relative6 = import_node_path106.default.relative(root, file);
|
|
80497
80629
|
if (excluded(relative6, entry.isDirectory())) continue;
|
|
80498
80630
|
const firstStep = steps.length;
|
|
80499
80631
|
steps.push(() => hash.update(`${relative6}\0`));
|
|
80500
80632
|
if (entry.isSymbolicLink()) {
|
|
80501
|
-
const link = `link\0${
|
|
80633
|
+
const link = `link\0${import_node_fs102.default.readlinkSync(file)}\0`;
|
|
80502
80634
|
steps.push(() => {
|
|
80503
80635
|
hash.update(link);
|
|
80504
80636
|
if (steersNative(relative6)) native.update(`${relative6}\0${link}`);
|
|
@@ -80508,9 +80640,9 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
80508
80640
|
walk4(file);
|
|
80509
80641
|
if (sourceOnly && steps.length === firstStep + 2) steps.length = firstStep;
|
|
80510
80642
|
} else if (entry.isFile()) {
|
|
80511
|
-
const posix2 = relative6.split(
|
|
80643
|
+
const posix2 = relative6.split(import_node_path106.default.sep).join("/");
|
|
80512
80644
|
if (NATIVE_CONFIG_FILE.test(posix2)) {
|
|
80513
|
-
const bytes =
|
|
80645
|
+
const bytes = import_node_fs102.default.readFileSync(file);
|
|
80514
80646
|
steps.push(() => {
|
|
80515
80647
|
if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
|
|
80516
80648
|
if (steersNative(relative6))
|
|
@@ -80519,7 +80651,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
80519
80651
|
continue;
|
|
80520
80652
|
}
|
|
80521
80653
|
if (everyByte) {
|
|
80522
|
-
const stat2 =
|
|
80654
|
+
const stat2 = import_node_fs102.default.statSync(file);
|
|
80523
80655
|
const known = fileDigests.get(file);
|
|
80524
80656
|
const content = known?.ino === stat2.ino && known.size === stat2.size && known.mtimeMs === stat2.mtimeMs && known.ctimeMs === stat2.ctimeMs ? known : {
|
|
80525
80657
|
ino: stat2.ino,
|
|
@@ -80540,7 +80672,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
80540
80672
|
for (let start = 0; start < unread.length; start += 32) {
|
|
80541
80673
|
await Promise.all(
|
|
80542
80674
|
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
80543
|
-
const bytes = await
|
|
80675
|
+
const bytes = await import_node_fs102.default.promises.readFile(file);
|
|
80544
80676
|
content.size = bytes.length;
|
|
80545
80677
|
content.digest = (0, import_node_crypto61.createHash)("sha256").update(bytes).digest("hex");
|
|
80546
80678
|
fileDigests.set(file, content);
|
|
@@ -80587,13 +80719,13 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
80587
80719
|
const retire = (directory2, used) => withSwiftRootLock(
|
|
80588
80720
|
directory2,
|
|
80589
80721
|
async () => {
|
|
80590
|
-
const retired =
|
|
80722
|
+
const retired = import_node_path106.default.join(
|
|
80591
80723
|
parent,
|
|
80592
|
-
`${RETIRED_PREFIX2}${process.pid}-${
|
|
80724
|
+
`${RETIRED_PREFIX2}${process.pid}-${import_node_path106.default.basename(directory2)}`
|
|
80593
80725
|
);
|
|
80594
|
-
if (
|
|
80726
|
+
if (import_node_fs102.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
|
|
80595
80727
|
try {
|
|
80596
|
-
|
|
80728
|
+
import_node_fs102.default.renameSync(directory2, retired);
|
|
80597
80729
|
} catch (error) {
|
|
80598
80730
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
|
|
80599
80731
|
throw error;
|
|
@@ -80604,15 +80736,15 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
80604
80736
|
false
|
|
80605
80737
|
);
|
|
80606
80738
|
const complete = [];
|
|
80607
|
-
for (const name3 of
|
|
80608
|
-
const directory2 =
|
|
80739
|
+
for (const name3 of import_node_fs102.default.readdirSync(parent)) {
|
|
80740
|
+
const directory2 = import_node_path106.default.join(parent, name3);
|
|
80609
80741
|
if (name3.startsWith(RETIRED_PREFIX2)) {
|
|
80610
80742
|
reapRetiredCacheDirectory(parent, name3);
|
|
80611
80743
|
continue;
|
|
80612
80744
|
}
|
|
80613
|
-
const used =
|
|
80745
|
+
const used = import_node_fs102.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
|
|
80614
80746
|
if (directory2 === keep || used === void 0) continue;
|
|
80615
|
-
if (
|
|
80747
|
+
if (import_node_fs102.default.existsSync(import_node_path106.default.join(directory2, ".peach-complete")) || import_node_fs102.default.existsSync(import_node_path106.default.join(directory2, ".peach-project-complete")))
|
|
80616
80748
|
complete.push({ directory: directory2, used });
|
|
80617
80749
|
else if (Date.now() - used > ABANDONED_WORKSPACE_MS) await retire(directory2, used);
|
|
80618
80750
|
}
|
|
@@ -80621,38 +80753,38 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
80621
80753
|
}
|
|
80622
80754
|
function syncChangedFiles(root, work, appRelative, excluded, installed2) {
|
|
80623
80755
|
const copyIfNewer = (file, relative6, newerOnly) => {
|
|
80624
|
-
const source =
|
|
80625
|
-
const target =
|
|
80626
|
-
const existing =
|
|
80756
|
+
const source = import_node_fs102.default.statSync(file);
|
|
80757
|
+
const target = import_node_path106.default.join(work, relative6);
|
|
80758
|
+
const existing = import_node_fs102.default.statSync(target, { throwIfNoEntry: false });
|
|
80627
80759
|
if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
|
|
80628
80760
|
return;
|
|
80629
|
-
|
|
80761
|
+
import_node_fs102.default.mkdirSync(import_node_path106.default.dirname(target), { recursive: true });
|
|
80630
80762
|
const staged = `${target}.${process.pid}.peach-sync`;
|
|
80631
|
-
|
|
80632
|
-
|
|
80633
|
-
|
|
80763
|
+
import_node_fs102.default.copyFileSync(file, staged);
|
|
80764
|
+
import_node_fs102.default.utimesSync(staged, source.atime, source.mtime);
|
|
80765
|
+
import_node_fs102.default.renameSync(staged, target);
|
|
80634
80766
|
};
|
|
80635
80767
|
const walkInstalled = (directory2) => {
|
|
80636
|
-
for (const entry of
|
|
80637
|
-
const file =
|
|
80768
|
+
for (const entry of import_node_fs102.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
80769
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
80638
80770
|
if (entry.isDirectory()) walkInstalled(file);
|
|
80639
|
-
else if (entry.isFile()) copyIfNewer(file,
|
|
80771
|
+
else if (entry.isFile()) copyIfNewer(file, import_node_path106.default.relative(root, file), true);
|
|
80640
80772
|
}
|
|
80641
80773
|
};
|
|
80642
|
-
const sourceIos =
|
|
80774
|
+
const sourceIos = import_node_fs102.default.existsSync(import_node_path106.default.join(root, appRelative, "ios", "Podfile"));
|
|
80643
80775
|
const walk4 = (directory2) => {
|
|
80644
|
-
for (const entry of
|
|
80645
|
-
const file =
|
|
80646
|
-
const relative6 =
|
|
80647
|
-
if (installed2 && entry.name === "node_modules" && entry.isDirectory() &&
|
|
80776
|
+
for (const entry of import_node_fs102.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
80777
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
80778
|
+
const relative6 = import_node_path106.default.relative(root, file);
|
|
80779
|
+
if (installed2 && entry.name === "node_modules" && entry.isDirectory() && import_node_fs102.default.existsSync(import_node_path106.default.join(work, relative6))) {
|
|
80648
80780
|
walkInstalled(file);
|
|
80649
80781
|
continue;
|
|
80650
80782
|
}
|
|
80651
|
-
if (excluded(relative6, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative6 ===
|
|
80783
|
+
if (excluded(relative6, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative6 === import_node_path106.default.join(appRelative, "ios"))
|
|
80652
80784
|
continue;
|
|
80653
80785
|
if (entry.isDirectory()) walk4(file);
|
|
80654
80786
|
else if (entry.isFile()) {
|
|
80655
|
-
if (NATIVE_CONFIG_FILE.test(relative6.split(
|
|
80787
|
+
if (NATIVE_CONFIG_FILE.test(relative6.split(import_node_path106.default.sep).join("/"))) continue;
|
|
80656
80788
|
copyIfNewer(file, relative6, false);
|
|
80657
80789
|
}
|
|
80658
80790
|
}
|
|
@@ -80663,10 +80795,10 @@ function watchRoot(root) {
|
|
|
80663
80795
|
const existing = watches.get(root);
|
|
80664
80796
|
if (existing) return existing;
|
|
80665
80797
|
const watch3 = { edits: 0 };
|
|
80666
|
-
const watcher =
|
|
80667
|
-
const parts2 = filename?.split(
|
|
80798
|
+
const watcher = import_node_fs102.default.watch(root, { recursive: true }, (_event, filename) => {
|
|
80799
|
+
const parts2 = filename?.split(import_node_path106.default.sep) ?? [];
|
|
80668
80800
|
const { excluded } = watch3;
|
|
80669
|
-
if (excluded && parts2.some((_, index) => excluded(parts2.slice(0, index + 1).join(
|
|
80801
|
+
if (excluded && parts2.some((_, index) => excluded(parts2.slice(0, index + 1).join(import_node_path106.default.sep))))
|
|
80670
80802
|
return;
|
|
80671
80803
|
if (filename && watch3.ignoredLater?.(filename)) return;
|
|
80672
80804
|
watch3.edits += 1;
|
|
@@ -80682,8 +80814,8 @@ function watchRoot(root) {
|
|
|
80682
80814
|
}
|
|
80683
80815
|
async function prepareExpoNativeWorkspace(app, signal, target) {
|
|
80684
80816
|
const prepared = await prepare2(app, "workspace", signal);
|
|
80685
|
-
const ios =
|
|
80686
|
-
const workspaces =
|
|
80817
|
+
const ios = import_node_path106.default.join(prepared.app, "ios");
|
|
80818
|
+
const workspaces = import_node_fs102.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
|
|
80687
80819
|
const workspace = selectXcodeWorkspace(ios, workspaces);
|
|
80688
80820
|
if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`);
|
|
80689
80821
|
await resolveXcodeSwiftPackages(workspace, signal, target);
|
|
@@ -80700,13 +80832,13 @@ function prepareExpoNativeProject(app, signal, dependencies = "lockfile") {
|
|
|
80700
80832
|
);
|
|
80701
80833
|
}
|
|
80702
80834
|
function prepare2(app, stage, signal) {
|
|
80703
|
-
app =
|
|
80835
|
+
app = import_node_fs102.default.realpathSync(app);
|
|
80704
80836
|
const podsEnvironment = reactNativePodsEnvironment();
|
|
80705
80837
|
const key2 = `${app}\0${stage}\0${JSON.stringify(podsEnvironment)}`;
|
|
80706
80838
|
const last = current.get(key2);
|
|
80707
|
-
if (last && last.watch.edits === last.edits && (
|
|
80839
|
+
if (last && last.watch.edits === last.edits && (import_node_fs102.default.existsSync(import_node_path106.default.join(last.result.work, ".peach-complete")) || stage !== "workspace" && import_node_fs102.default.existsSync(import_node_path106.default.join(last.result.work, ".peach-project-complete")))) {
|
|
80708
80840
|
const now = /* @__PURE__ */ new Date();
|
|
80709
|
-
|
|
80841
|
+
import_node_fs102.default.utimesSync(last.result.work, now, now);
|
|
80710
80842
|
return Promise.resolve(last.result);
|
|
80711
80843
|
}
|
|
80712
80844
|
let shared = preparing.get(key2);
|
|
@@ -80729,25 +80861,25 @@ function prepare2(app, stage, signal) {
|
|
|
80729
80861
|
}
|
|
80730
80862
|
async function copyInstalledWorkspace(root, destination, excluded) {
|
|
80731
80863
|
const installed2 = [];
|
|
80732
|
-
await
|
|
80864
|
+
await import_node_fs102.default.promises.cp(root, destination, {
|
|
80733
80865
|
recursive: true,
|
|
80734
|
-
mode:
|
|
80866
|
+
mode: import_node_fs102.default.constants.COPYFILE_FICLONE,
|
|
80735
80867
|
preserveTimestamps: true,
|
|
80736
80868
|
verbatimSymlinks: true,
|
|
80737
80869
|
filter: (source) => {
|
|
80738
|
-
const relative6 =
|
|
80739
|
-
if (
|
|
80870
|
+
const relative6 = import_node_path106.default.relative(root, source);
|
|
80871
|
+
if (import_node_path106.default.basename(source) === "node_modules") installed2.push(relative6);
|
|
80740
80872
|
return !excluded(relative6);
|
|
80741
80873
|
}
|
|
80742
80874
|
});
|
|
80743
80875
|
const entries2 = installed2.flatMap((relative6) => {
|
|
80744
|
-
const source =
|
|
80745
|
-
if (
|
|
80746
|
-
|
|
80876
|
+
const source = import_node_path106.default.join(root, relative6);
|
|
80877
|
+
if (import_node_fs102.default.lstatSync(source).isSymbolicLink()) {
|
|
80878
|
+
import_node_fs102.default.symlinkSync(import_node_fs102.default.readlinkSync(source), import_node_path106.default.join(destination, relative6));
|
|
80747
80879
|
return [];
|
|
80748
80880
|
}
|
|
80749
|
-
|
|
80750
|
-
return
|
|
80881
|
+
import_node_fs102.default.mkdirSync(import_node_path106.default.join(destination, relative6));
|
|
80882
|
+
return import_node_fs102.default.readdirSync(source).filter((name3) => name3 !== ".cache").map((name3) => import_node_path106.default.join(relative6, name3));
|
|
80751
80883
|
});
|
|
80752
80884
|
if (process.platform === "darwin") {
|
|
80753
80885
|
await new Promise((resolve11, reject) => {
|
|
@@ -80759,8 +80891,8 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
80759
80891
|
);
|
|
80760
80892
|
child.stdin?.end(
|
|
80761
80893
|
entries2.flatMap((relative6) => [
|
|
80762
|
-
|
|
80763
|
-
|
|
80894
|
+
import_node_path106.default.join(root, relative6),
|
|
80895
|
+
import_node_path106.default.join(destination, relative6)
|
|
80764
80896
|
]).join("\0")
|
|
80765
80897
|
);
|
|
80766
80898
|
});
|
|
@@ -80773,32 +80905,32 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
80773
80905
|
"-R",
|
|
80774
80906
|
"-p",
|
|
80775
80907
|
"--reflink=auto",
|
|
80776
|
-
|
|
80777
|
-
|
|
80908
|
+
import_node_path106.default.join(root, relative6),
|
|
80909
|
+
import_node_path106.default.join(destination, relative6)
|
|
80778
80910
|
]);
|
|
80779
80911
|
return clone();
|
|
80780
80912
|
};
|
|
80781
80913
|
await Promise.all(Array.from({ length: 8 }, clone));
|
|
80782
80914
|
}
|
|
80783
80915
|
function nativeWorkspacesDir(root) {
|
|
80784
|
-
const device =
|
|
80916
|
+
const device = import_node_fs102.default.statSync(root).dev;
|
|
80785
80917
|
for (const cache of [
|
|
80786
80918
|
sharedCacheDir(cacheDir()),
|
|
80787
80919
|
cacheDir(),
|
|
80788
|
-
|
|
80920
|
+
import_node_path106.default.join(import_node_os21.default.homedir(), ".peach-cache")
|
|
80789
80921
|
]) {
|
|
80790
80922
|
let existing = cache;
|
|
80791
|
-
while (!
|
|
80792
|
-
if (
|
|
80793
|
-
return
|
|
80794
|
-
}
|
|
80795
|
-
let mount =
|
|
80796
|
-
while (
|
|
80797
|
-
mount =
|
|
80798
|
-
const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp",
|
|
80923
|
+
while (!import_node_fs102.default.existsSync(existing)) existing = import_node_path106.default.dirname(existing);
|
|
80924
|
+
if (import_node_fs102.default.statSync(existing).dev === device)
|
|
80925
|
+
return import_node_path106.default.join(cache, "expo-native-workspaces");
|
|
80926
|
+
}
|
|
80927
|
+
let mount = import_node_fs102.default.realpathSync(root);
|
|
80928
|
+
while (import_node_path106.default.dirname(mount) !== mount && import_node_fs102.default.statSync(import_node_path106.default.dirname(mount)).dev === device)
|
|
80929
|
+
mount = import_node_path106.default.dirname(mount);
|
|
80930
|
+
const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp", import_node_fs102.default.realpathSync(import_node_os21.default.tmpdir())]);
|
|
80799
80931
|
if (tmpRoots.has(mount))
|
|
80800
|
-
return
|
|
80801
|
-
return
|
|
80932
|
+
return import_node_path106.default.join(sharedCacheDir(cacheDir()), "expo-native-workspaces");
|
|
80933
|
+
return import_node_path106.default.join(mount, ".peach-cache", "expo-native-workspaces");
|
|
80802
80934
|
}
|
|
80803
80935
|
function preparedExpoWorkspacesDir(app) {
|
|
80804
80936
|
return nativeWorkspacesDir(findWorkspaceRoot(app));
|
|
@@ -80812,7 +80944,7 @@ function trackedSourceEntries(root, work) {
|
|
|
80812
80944
|
if (listed.status !== 0) return [];
|
|
80813
80945
|
return listed.stdout.toString("utf8").split("\0").filter((entry) => {
|
|
80814
80946
|
const tab = entry.indexOf(" ");
|
|
80815
|
-
return tab > 0 &&
|
|
80947
|
+
return tab > 0 && import_node_fs102.default.existsSync(import_node_path106.default.join(work, entry.slice(tab + 1)));
|
|
80816
80948
|
});
|
|
80817
80949
|
}
|
|
80818
80950
|
function initializeWorkspaceGit(root, work) {
|
|
@@ -80861,42 +80993,42 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
80861
80993
|
);
|
|
80862
80994
|
watch3.excluded = excluded;
|
|
80863
80995
|
watch3.ignoredLater = await untrackedIgnored(root, linkedPackageDirectories(root, app));
|
|
80864
|
-
const manifest = JSON.parse(
|
|
80865
|
-
const appManifest = JSON.parse(
|
|
80866
|
-
const work =
|
|
80996
|
+
const manifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
|
|
80997
|
+
const appManifest = JSON.parse(import_node_fs102.default.readFileSync(import_node_path106.default.join(app, "package.json"), "utf8"));
|
|
80998
|
+
const work = import_node_path106.default.join(
|
|
80867
80999
|
nativeWorkspacesDir(root),
|
|
80868
81000
|
stage === "installed-project" ? `${nativeHash}-installed` : nativeHash
|
|
80869
81001
|
);
|
|
80870
81002
|
report(`hashed ${root}`);
|
|
80871
81003
|
const result = await withSwiftRootLock(work, async (lease) => {
|
|
80872
|
-
const marker =
|
|
80873
|
-
const projectMarker =
|
|
80874
|
-
const preparedApp =
|
|
80875
|
-
const projectReady =
|
|
81004
|
+
const marker = import_node_path106.default.join(work, ".peach-complete");
|
|
81005
|
+
const projectMarker = import_node_path106.default.join(work, ".peach-project-complete");
|
|
81006
|
+
const preparedApp = import_node_path106.default.join(work, appRelative);
|
|
81007
|
+
const projectReady = import_node_fs102.default.existsSync(marker) || import_node_fs102.default.existsSync(projectMarker);
|
|
80876
81008
|
if (projectReady) {
|
|
80877
81009
|
syncChangedFiles(
|
|
80878
81010
|
root,
|
|
80879
81011
|
work,
|
|
80880
81012
|
appRelative,
|
|
80881
81013
|
excluded,
|
|
80882
|
-
stage === "workspace" && !
|
|
81014
|
+
stage === "workspace" && !import_node_fs102.default.existsSync(marker)
|
|
80883
81015
|
);
|
|
80884
81016
|
report(`reusing prepared workspace ${work}`);
|
|
80885
81017
|
}
|
|
80886
81018
|
if (!projectReady) {
|
|
80887
81019
|
const partial = `${work}.${process.pid}.partial`;
|
|
80888
|
-
await
|
|
80889
|
-
await
|
|
80890
|
-
|
|
81020
|
+
await import_node_fs102.default.promises.rm(partial, { recursive: true, force: true });
|
|
81021
|
+
await import_node_fs102.default.promises.rm(work, { recursive: true, force: true });
|
|
81022
|
+
import_node_fs102.default.mkdirSync(import_node_path106.default.dirname(work), { recursive: true });
|
|
80891
81023
|
report("copying workspace");
|
|
80892
81024
|
await copyInstalledWorkspace(root, partial, excluded);
|
|
80893
|
-
|
|
81025
|
+
import_node_fs102.default.renameSync(partial, work);
|
|
80894
81026
|
initializeWorkspaceGit(root, work);
|
|
80895
81027
|
report("copied workspace");
|
|
80896
81028
|
}
|
|
80897
|
-
if (projectReady && (stage !== "workspace" ||
|
|
81029
|
+
if (projectReady && (stage !== "workspace" || import_node_fs102.default.existsSync(marker))) {
|
|
80898
81030
|
const now2 = /* @__PURE__ */ new Date();
|
|
80899
|
-
|
|
81031
|
+
import_node_fs102.default.utimesSync(work, now2, now2);
|
|
80900
81032
|
return { app: preparedApp, work };
|
|
80901
81033
|
}
|
|
80902
81034
|
const trustedConfigs = /* @__PURE__ */ new Set();
|
|
@@ -80908,10 +81040,10 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
80908
81040
|
if (result2.status !== 0) continue;
|
|
80909
81041
|
const configs = JSON.parse(result2.stdout);
|
|
80910
81042
|
for (const config of configs) {
|
|
80911
|
-
const relative6 =
|
|
80912
|
-
if (relative6.startsWith("..") ||
|
|
80913
|
-
const copy =
|
|
80914
|
-
if (
|
|
81043
|
+
const relative6 = import_node_path106.default.relative(root, config.path);
|
|
81044
|
+
if (relative6.startsWith("..") || import_node_path106.default.isAbsolute(relative6)) continue;
|
|
81045
|
+
const copy = import_node_path106.default.join(work, relative6);
|
|
81046
|
+
if (import_node_fs102.default.existsSync(copy) && import_node_fs102.default.readFileSync(config.path).equals(import_node_fs102.default.readFileSync(copy)))
|
|
80915
81047
|
trustedConfigs.add(copy);
|
|
80916
81048
|
}
|
|
80917
81049
|
}
|
|
@@ -80919,7 +81051,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
80919
81051
|
MISE_TRUSTED_CONFIG_PATHS: [
|
|
80920
81052
|
process.env.MISE_TRUSTED_CONFIG_PATHS,
|
|
80921
81053
|
...trustedConfigs
|
|
80922
|
-
].filter(Boolean).join(
|
|
81054
|
+
].filter(Boolean).join(import_node_path106.default.delimiter)
|
|
80923
81055
|
};
|
|
80924
81056
|
const run17 = (command, args, cwd, env = {}, admit = true) => {
|
|
80925
81057
|
const admitted = admit && teamMachineInstalled();
|
|
@@ -80937,8 +81069,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
80937
81069
|
const nodeVersion = pinnedNodeVersion(root, manifest);
|
|
80938
81070
|
const pinnedBun = manager.startsWith("bun@");
|
|
80939
81071
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, ...pinnedBun ? [manager] : [], "--"] : [];
|
|
80940
|
-
const bunPrefix =
|
|
80941
|
-
const bunExecutable =
|
|
81072
|
+
const bunPrefix = import_node_path106.default.join(cacheDir(), "package-managers", manager);
|
|
81073
|
+
const bunExecutable = import_node_path106.default.join(bunPrefix, "node_modules/.bin/bun");
|
|
80942
81074
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
80943
81075
|
"npx",
|
|
80944
81076
|
"--yes",
|
|
@@ -80953,7 +81085,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
80953
81085
|
);
|
|
80954
81086
|
const installEnv = {
|
|
80955
81087
|
npm_config_ignore_scripts: "false",
|
|
80956
|
-
...pinnedBun && !nodeVersion ? { PATH: [
|
|
81088
|
+
...pinnedBun && !nodeVersion ? { PATH: [import_node_path106.default.dirname(bunExecutable), process.env.PATH].join(import_node_path106.default.delimiter) } : {}
|
|
80957
81089
|
};
|
|
80958
81090
|
const execute = async (args, cwd, env = {}) => {
|
|
80959
81091
|
const command = [...prefix, ...args];
|
|
@@ -80979,7 +81111,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
80979
81111
|
);
|
|
80980
81112
|
}
|
|
80981
81113
|
}
|
|
80982
|
-
if (install[0] === "npm" &&
|
|
81114
|
+
if (install[0] === "npm" && import_node_fs102.default.existsSync(import_node_path106.default.join(work, "package-lock.json"))) {
|
|
80983
81115
|
report("checking npm lockfile");
|
|
80984
81116
|
const check2 = [
|
|
80985
81117
|
...prefix,
|
|
@@ -81007,9 +81139,9 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
81007
81139
|
report,
|
|
81008
81140
|
oneSdkPrepared
|
|
81009
81141
|
);
|
|
81010
|
-
|
|
81142
|
+
import_node_fs102.default.writeFileSync(projectMarker, "complete\n");
|
|
81011
81143
|
}
|
|
81012
|
-
if (stage === "workspace" && !
|
|
81144
|
+
if (stage === "workspace" && !import_node_fs102.default.existsSync(marker)) {
|
|
81013
81145
|
await prepareNativeProject(
|
|
81014
81146
|
preparedApp,
|
|
81015
81147
|
work,
|
|
@@ -81019,14 +81151,14 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
81019
81151
|
report,
|
|
81020
81152
|
oneSdkPrepared
|
|
81021
81153
|
);
|
|
81022
|
-
|
|
81154
|
+
import_node_fs102.default.writeFileSync(marker, "complete\n");
|
|
81023
81155
|
}
|
|
81024
81156
|
const now = /* @__PURE__ */ new Date();
|
|
81025
|
-
|
|
81157
|
+
import_node_fs102.default.utimesSync(work, now, now);
|
|
81026
81158
|
return { app: preparedApp, work };
|
|
81027
81159
|
});
|
|
81028
81160
|
if (stage === "workspace") readInstalledPodspecs(app, result.app);
|
|
81029
|
-
await pruneExpoNativeWorkspaces(
|
|
81161
|
+
await pruneExpoNativeWorkspaces(import_node_path106.default.dirname(work), work);
|
|
81030
81162
|
current.set(key2, { watch: watch3, edits, result });
|
|
81031
81163
|
return result;
|
|
81032
81164
|
}
|
|
@@ -81034,20 +81166,20 @@ function declaresNativeDependency(manifest, name3) {
|
|
|
81034
81166
|
return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
|
|
81035
81167
|
}
|
|
81036
81168
|
async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
|
|
81037
|
-
const appRequire = (0, import_node_module10.createRequire)(
|
|
81169
|
+
const appRequire = (0, import_node_module10.createRequire)(import_node_path106.default.join(app, "package.json"));
|
|
81038
81170
|
const sourcePodEnv = {
|
|
81039
81171
|
EXPO_USE_PRECOMPILED_MODULES: "0",
|
|
81040
81172
|
ONE_PREBUILT_IOS: "0",
|
|
81041
81173
|
RCT_NEW_ARCH_ENABLED: process.env.RCT_NEW_ARCH_ENABLED ?? "1"
|
|
81042
81174
|
};
|
|
81043
81175
|
const declares2 = (name3) => declaresNativeDependency(manifest, name3);
|
|
81044
|
-
if (!
|
|
81176
|
+
if (!import_node_fs102.default.existsSync(import_node_path106.default.join(app, "ios", "Podfile"))) {
|
|
81045
81177
|
if (!declares2("expo") && !declares2("one"))
|
|
81046
81178
|
throw new Error(
|
|
81047
81179
|
`${app} has no ios/Podfile and declares neither expo nor one, so peach cannot generate an iOS project for it`
|
|
81048
81180
|
);
|
|
81049
81181
|
const prebuild = declares2("expo") ? [appRequire.resolve("expo/bin/cli"), "prebuild"] : [
|
|
81050
|
-
|
|
81182
|
+
import_node_path106.default.join(import_node_path106.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
|
|
81051
81183
|
"prebuild"
|
|
81052
81184
|
];
|
|
81053
81185
|
await execute(
|
|
@@ -81083,25 +81215,25 @@ async function prepareNativeProject(app, workspace, manifest, stage, execute, re
|
|
|
81083
81215
|
function stageCachedQuickCryptoOpenSsl(app) {
|
|
81084
81216
|
const root = findWorkspaceRoot(app);
|
|
81085
81217
|
let packageDir = null;
|
|
81086
|
-
for (let at = app; ; at =
|
|
81087
|
-
const candidate =
|
|
81088
|
-
if (
|
|
81218
|
+
for (let at = app; ; at = import_node_path106.default.dirname(at)) {
|
|
81219
|
+
const candidate = import_node_path106.default.join(at, "node_modules", "react-native-quick-crypto");
|
|
81220
|
+
if (import_node_fs102.default.existsSync(import_node_path106.default.join(candidate, "QuickCrypto.podspec"))) {
|
|
81089
81221
|
packageDir = candidate;
|
|
81090
81222
|
break;
|
|
81091
81223
|
}
|
|
81092
|
-
if (at === root ||
|
|
81224
|
+
if (at === root || import_node_path106.default.dirname(at) === at) break;
|
|
81093
81225
|
}
|
|
81094
81226
|
if (!packageDir) return;
|
|
81095
|
-
const opensslDir =
|
|
81096
|
-
if (
|
|
81097
|
-
const podspec =
|
|
81227
|
+
const opensslDir = import_node_path106.default.join(packageDir, "ios", "openssl");
|
|
81228
|
+
if (import_node_fs102.default.existsSync(import_node_path106.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
|
|
81229
|
+
const podspec = import_node_fs102.default.readFileSync(import_node_path106.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
|
|
81098
81230
|
const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
|
|
81099
81231
|
if (!sha2565) return;
|
|
81100
|
-
const archive =
|
|
81101
|
-
if (!
|
|
81232
|
+
const archive = import_node_path106.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
|
|
81233
|
+
if (!import_node_fs102.default.existsSync(archive) || (0, import_node_crypto61.createHash)("sha256").update(import_node_fs102.default.readFileSync(archive)).digest("hex") !== sha2565)
|
|
81102
81234
|
return;
|
|
81103
|
-
|
|
81104
|
-
|
|
81235
|
+
import_node_fs102.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
81236
|
+
import_node_fs102.default.mkdirSync(opensslDir, { recursive: true });
|
|
81105
81237
|
(0, import_node_child_process48.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
|
|
81106
81238
|
}
|
|
81107
81239
|
async function runAdmitted(lease, command, args, cwd, extraEnv, admitted) {
|
|
@@ -81136,16 +81268,16 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
81136
81268
|
});
|
|
81137
81269
|
});
|
|
81138
81270
|
}
|
|
81139
|
-
var import_node_child_process48, import_node_crypto61,
|
|
81271
|
+
var import_node_child_process48, import_node_crypto61, import_node_fs102, import_node_module10, import_node_os21, import_node_path106, import_node_util13, isolatedGitEnv, EXACT_VERSION, NATIVE_CONFIG_FILE, NATIVE_SOURCE_FILE2, fileDigests, NATIVE_PACKAGE_ENTRY, hashing, KEPT_WORKSPACES, WORKSPACE_GRACE_MS, ABANDONED_WORKSPACE_MS, RETIRED_PREFIX2, preparing, watches, current, CLONE_ENTRIES;
|
|
81140
81272
|
var init_expo_native_workspace = __esm({
|
|
81141
81273
|
"src/expo-native-workspace.ts"() {
|
|
81142
81274
|
"use strict";
|
|
81143
81275
|
import_node_child_process48 = require("node:child_process");
|
|
81144
81276
|
import_node_crypto61 = require("node:crypto");
|
|
81145
|
-
|
|
81277
|
+
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
81146
81278
|
import_node_module10 = require("node:module");
|
|
81147
81279
|
import_node_os21 = __toESM(require("node:os"), 1);
|
|
81148
|
-
|
|
81280
|
+
import_node_path106 = __toESM(require("node:path"), 1);
|
|
81149
81281
|
import_node_util13 = require("node:util");
|
|
81150
81282
|
init_detect();
|
|
81151
81283
|
init_admitted_mac_build();
|
|
@@ -81233,7 +81365,7 @@ async function expoDiscoveryKey(options2) {
|
|
|
81233
81365
|
return { key: key2, root };
|
|
81234
81366
|
}
|
|
81235
81367
|
function expoDiscoveryCacheDir() {
|
|
81236
|
-
return
|
|
81368
|
+
return import_node_path107.default.join(sharedCacheDir(import_node_path107.default.join(ambientHomeDir(), "cache")), "expo-discovery");
|
|
81237
81369
|
}
|
|
81238
81370
|
function vanished2(error) {
|
|
81239
81371
|
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
@@ -81241,25 +81373,25 @@ function vanished2(error) {
|
|
|
81241
81373
|
function renew(file) {
|
|
81242
81374
|
const now = /* @__PURE__ */ new Date();
|
|
81243
81375
|
try {
|
|
81244
|
-
|
|
81376
|
+
import_node_fs103.default.utimesSync(file, now, now);
|
|
81245
81377
|
} catch (error) {
|
|
81246
81378
|
if (!vanished2(error)) throw error;
|
|
81247
81379
|
}
|
|
81248
81380
|
}
|
|
81249
81381
|
function expireDiscovery(dir, keep) {
|
|
81250
81382
|
const sweep = (parent, expiry) => {
|
|
81251
|
-
if (!
|
|
81252
|
-
for (const name3 of
|
|
81383
|
+
if (!import_node_fs103.default.existsSync(parent)) return;
|
|
81384
|
+
for (const name3 of import_node_fs103.default.readdirSync(parent)) {
|
|
81253
81385
|
if (!expiry(name3)) continue;
|
|
81254
|
-
const file =
|
|
81255
|
-
const modified =
|
|
81386
|
+
const file = import_node_path107.default.join(parent, name3);
|
|
81387
|
+
const modified = import_node_fs103.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
|
|
81256
81388
|
if (modified === void 0 || file === keep) continue;
|
|
81257
81389
|
const limit = name3.endsWith(".tmp") ? ORPHAN_TEMPORARY_MS : EXPIRY_MS;
|
|
81258
|
-
if (Date.now() - modified > limit)
|
|
81390
|
+
if (Date.now() - modified > limit) import_node_fs103.default.rmSync(file, { force: true });
|
|
81259
81391
|
}
|
|
81260
81392
|
};
|
|
81261
81393
|
sweep(dir, (name3) => name3.endsWith(".json") || name3.endsWith(".tmp"));
|
|
81262
|
-
sweep(
|
|
81394
|
+
sweep(import_node_path107.default.join(dir, "blobs"), () => true);
|
|
81263
81395
|
}
|
|
81264
81396
|
function isExpoSwiftSourceUnit(value) {
|
|
81265
81397
|
return isRecord(value) && typeof value.namespace === "string" && typeof value.moduleId === "string" && (value.nativeAppIdentity === void 0 || isNativeAppIdentity(value.nativeAppIdentity)) && strings2(value.classes) && strings2(value.bridgeModules) && strings2(value.appDelegateSubscribers) && strings2(value.reactDelegateHandlers) && stringRecord(value.files) && strings2(value.frameworks) && (value.workspaceSources === void 0 || strings2(value.workspaceSources)) && (value.nativeTargets === void 0 || Array.isArray(value.nativeTargets) && value.nativeTargets.every(isRecord)) && (value.nativeFiles === void 0 || stringRecord(value.nativeFiles)) && (value.resources === void 0 || stringRecord(value.resources)) && (value.resourceBundles === void 0 || isSwiftResourceBundles(value.resourceBundles)) && (value.swiftLanguageMode === void 0 || typeof value.swiftLanguageMode === "number");
|
|
@@ -81269,9 +81401,9 @@ function isStoredUnit(value) {
|
|
|
81269
81401
|
}
|
|
81270
81402
|
function readExpoDiscovery(key2) {
|
|
81271
81403
|
let parsed2;
|
|
81272
|
-
const record6 =
|
|
81404
|
+
const record6 = import_node_path107.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
|
|
81273
81405
|
try {
|
|
81274
|
-
parsed2 = JSON.parse(
|
|
81406
|
+
parsed2 = JSON.parse(import_node_fs103.default.readFileSync(record6, "utf8"));
|
|
81275
81407
|
} catch {
|
|
81276
81408
|
return void 0;
|
|
81277
81409
|
}
|
|
@@ -81298,8 +81430,8 @@ function readExpoDiscovery(key2) {
|
|
|
81298
81430
|
if (!Array.isArray(parsed2.units) || !parsed2.units.every(isBodyOffset))
|
|
81299
81431
|
return void 0;
|
|
81300
81432
|
if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
|
|
81301
|
-
const archive =
|
|
81302
|
-
const bytes =
|
|
81433
|
+
const archive = import_node_path107.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
|
|
81434
|
+
const bytes = import_node_fs103.default.readFileSync(archive);
|
|
81303
81435
|
if ((0, import_node_crypto62.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
|
|
81304
81436
|
return void 0;
|
|
81305
81437
|
const bodies = (0, import_node_zlib7.zstdDecompressSync)(bytes);
|
|
@@ -81354,13 +81486,13 @@ function readExpoDiscovery(key2) {
|
|
|
81354
81486
|
}
|
|
81355
81487
|
}
|
|
81356
81488
|
function fileHashesPath() {
|
|
81357
|
-
return
|
|
81489
|
+
return import_node_path107.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
|
|
81358
81490
|
}
|
|
81359
81491
|
function stampedFileHash(file) {
|
|
81360
81492
|
if (!fileHashesLoaded) {
|
|
81361
81493
|
fileHashesLoaded = true;
|
|
81362
81494
|
try {
|
|
81363
|
-
const saved = JSON.parse(
|
|
81495
|
+
const saved = JSON.parse(import_node_fs103.default.readFileSync(fileHashesPath(), "utf8"));
|
|
81364
81496
|
if (isRecord(saved)) {
|
|
81365
81497
|
for (const [entry, value] of Object.entries(saved))
|
|
81366
81498
|
if (Array.isArray(value) && typeof value[0] === "string" && typeof value[1] === "string")
|
|
@@ -81370,11 +81502,11 @@ function stampedFileHash(file) {
|
|
|
81370
81502
|
fileHashes.clear();
|
|
81371
81503
|
}
|
|
81372
81504
|
}
|
|
81373
|
-
const stat2 =
|
|
81505
|
+
const stat2 = import_node_fs103.default.statSync(file, { bigint: true });
|
|
81374
81506
|
const stamp = [stat2.dev, stat2.ino, stat2.size, stat2.mtimeNs, stat2.ctimeNs].join(":");
|
|
81375
81507
|
const cached4 = fileHashes.get(file);
|
|
81376
81508
|
if (cached4?.stamp === stamp) return cached4.checksum;
|
|
81377
|
-
const checksum = (0, import_node_crypto62.createHash)("sha256").update(
|
|
81509
|
+
const checksum = (0, import_node_crypto62.createHash)("sha256").update(import_node_fs103.default.readFileSync(file)).digest("hex");
|
|
81378
81510
|
fileHashes.set(file, { stamp, checksum });
|
|
81379
81511
|
fileHashesChanged = true;
|
|
81380
81512
|
return checksum;
|
|
@@ -81385,18 +81517,18 @@ function saveFileHashes() {
|
|
|
81385
81517
|
const target = fileHashesPath();
|
|
81386
81518
|
const temporary = `${target}.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`;
|
|
81387
81519
|
try {
|
|
81388
|
-
|
|
81389
|
-
|
|
81520
|
+
import_node_fs103.default.mkdirSync(import_node_path107.default.dirname(target), { recursive: true });
|
|
81521
|
+
import_node_fs103.default.writeFileSync(
|
|
81390
81522
|
temporary,
|
|
81391
81523
|
JSON.stringify(
|
|
81392
81524
|
Object.fromEntries(
|
|
81393
|
-
[...fileHashes].filter(([entry]) =>
|
|
81525
|
+
[...fileHashes].filter(([entry]) => import_node_fs103.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
|
|
81394
81526
|
)
|
|
81395
81527
|
)
|
|
81396
81528
|
);
|
|
81397
|
-
|
|
81529
|
+
import_node_fs103.default.renameSync(temporary, target);
|
|
81398
81530
|
} catch {
|
|
81399
|
-
|
|
81531
|
+
import_node_fs103.default.rmSync(temporary, { force: true });
|
|
81400
81532
|
}
|
|
81401
81533
|
}
|
|
81402
81534
|
function treeDigest(directory2, signal) {
|
|
@@ -81404,14 +81536,14 @@ function treeDigest(directory2, signal) {
|
|
|
81404
81536
|
const seen = /* @__PURE__ */ new Set();
|
|
81405
81537
|
const walk4 = (dir) => {
|
|
81406
81538
|
signal?.throwIfAborted();
|
|
81407
|
-
const canonical =
|
|
81539
|
+
const canonical = import_node_fs103.default.realpathSync(dir);
|
|
81408
81540
|
if (seen.has(canonical)) return;
|
|
81409
81541
|
seen.add(canonical);
|
|
81410
|
-
for (const child of
|
|
81411
|
-
const file =
|
|
81412
|
-
const relative6 =
|
|
81542
|
+
for (const child of import_node_fs103.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
81543
|
+
const file = import_node_path107.default.join(dir, child.name);
|
|
81544
|
+
const relative6 = import_node_path107.default.relative(directory2, file);
|
|
81413
81545
|
if (child.isSymbolicLink()) {
|
|
81414
|
-
entries2.set(relative6, `link\0${
|
|
81546
|
+
entries2.set(relative6, `link\0${import_node_fs103.default.readlinkSync(file)}`);
|
|
81415
81547
|
} else if (child.isDirectory()) {
|
|
81416
81548
|
walk4(file);
|
|
81417
81549
|
} else if (child.isFile()) {
|
|
@@ -81425,7 +81557,7 @@ function treeDigest(directory2, signal) {
|
|
|
81425
81557
|
function frameworkDigest(directory2, signal) {
|
|
81426
81558
|
let root;
|
|
81427
81559
|
try {
|
|
81428
|
-
root =
|
|
81560
|
+
root = import_node_fs103.default.realpathSync(directory2);
|
|
81429
81561
|
} catch (error) {
|
|
81430
81562
|
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
|
|
81431
81563
|
return MISSING_TREE;
|
|
@@ -81434,8 +81566,8 @@ function frameworkDigest(directory2, signal) {
|
|
|
81434
81566
|
const entries2 = treeDigest(directory2, signal);
|
|
81435
81567
|
for (const [relative6, value] of entries2) {
|
|
81436
81568
|
if (!value.startsWith("link\0")) continue;
|
|
81437
|
-
const target =
|
|
81438
|
-
if (target !== root && !target.startsWith(`${root}${
|
|
81569
|
+
const target = import_node_fs103.default.realpathSync(import_node_path107.default.join(directory2, relative6));
|
|
81570
|
+
if (target !== root && !target.startsWith(`${root}${import_node_path107.default.sep}`))
|
|
81439
81571
|
throw new Error(`framework link escapes its tree: ${relative6}`);
|
|
81440
81572
|
}
|
|
81441
81573
|
return (0, import_node_crypto62.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
|
|
@@ -81453,8 +81585,8 @@ function rewritePreparedPaths(options2) {
|
|
|
81453
81585
|
let preparedBytes;
|
|
81454
81586
|
let sourceBytes;
|
|
81455
81587
|
try {
|
|
81456
|
-
preparedBytes =
|
|
81457
|
-
sourceBytes =
|
|
81588
|
+
preparedBytes = import_node_fs103.default.readFileSync(preparedFile);
|
|
81589
|
+
sourceBytes = import_node_fs103.default.readFileSync(sourceFile);
|
|
81458
81590
|
} catch {
|
|
81459
81591
|
return null;
|
|
81460
81592
|
}
|
|
@@ -81484,7 +81616,7 @@ function rewritePreparedPaths(options2) {
|
|
|
81484
81616
|
return match;
|
|
81485
81617
|
const separator = value.lastIndexOf("#");
|
|
81486
81618
|
const preparedFile = value.slice(0, separator);
|
|
81487
|
-
if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${
|
|
81619
|
+
if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path107.default.sep}`)) {
|
|
81488
81620
|
refusedPlugin = true;
|
|
81489
81621
|
return match;
|
|
81490
81622
|
}
|
|
@@ -81532,22 +81664,22 @@ function rewritePreparedPaths(options2) {
|
|
|
81532
81664
|
frameworkDependencies[sourceDir] = sourceDigest;
|
|
81533
81665
|
let portableDir = sourceDir;
|
|
81534
81666
|
if (preparedDigest !== sourceDigest) {
|
|
81535
|
-
const parent =
|
|
81536
|
-
portableDir =
|
|
81537
|
-
if (!
|
|
81538
|
-
|
|
81539
|
-
const tmp =
|
|
81667
|
+
const parent = import_node_path107.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
|
|
81668
|
+
portableDir = import_node_path107.default.join(parent, import_node_path107.default.basename(dir));
|
|
81669
|
+
if (!import_node_fs103.default.existsSync(portableDir)) {
|
|
81670
|
+
import_node_fs103.default.mkdirSync(parent, { recursive: true });
|
|
81671
|
+
const tmp = import_node_path107.default.join(parent, `.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`);
|
|
81540
81672
|
try {
|
|
81541
|
-
|
|
81673
|
+
import_node_fs103.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
|
|
81542
81674
|
if (frameworkDigest(tmp, signal) !== preparedDigest)
|
|
81543
81675
|
return { refuse: `framework changed while copying: ${dir}` };
|
|
81544
81676
|
try {
|
|
81545
|
-
|
|
81677
|
+
import_node_fs103.default.renameSync(tmp, portableDir);
|
|
81546
81678
|
} catch (error) {
|
|
81547
|
-
if (!
|
|
81679
|
+
if (!import_node_fs103.default.existsSync(portableDir)) throw error;
|
|
81548
81680
|
}
|
|
81549
81681
|
} finally {
|
|
81550
|
-
|
|
81682
|
+
import_node_fs103.default.rmSync(tmp, { recursive: true, force: true });
|
|
81551
81683
|
}
|
|
81552
81684
|
}
|
|
81553
81685
|
if (frameworkDigest(portableDir, signal) !== preparedDigest)
|
|
@@ -81564,10 +81696,10 @@ function rewritePreparedPaths(options2) {
|
|
|
81564
81696
|
function writeExpoDiscovery(options2) {
|
|
81565
81697
|
try {
|
|
81566
81698
|
const dir = expoDiscoveryCacheDir();
|
|
81567
|
-
|
|
81568
|
-
const tmp =
|
|
81699
|
+
import_node_fs103.default.mkdirSync(dir, { recursive: true });
|
|
81700
|
+
const tmp = import_node_path107.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto62.randomUUID)()}.tmp`);
|
|
81569
81701
|
if (options2.units === null) {
|
|
81570
|
-
|
|
81702
|
+
import_node_fs103.default.writeFileSync(
|
|
81571
81703
|
tmp,
|
|
81572
81704
|
JSON.stringify({
|
|
81573
81705
|
format: FORMAT,
|
|
@@ -81577,11 +81709,11 @@ function writeExpoDiscovery(options2) {
|
|
|
81577
81709
|
frameworks: {}
|
|
81578
81710
|
})
|
|
81579
81711
|
);
|
|
81580
|
-
|
|
81581
|
-
expireDiscovery(dir,
|
|
81712
|
+
import_node_fs103.default.renameSync(tmp, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
81713
|
+
expireDiscovery(dir, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
81582
81714
|
return null;
|
|
81583
81715
|
}
|
|
81584
|
-
const preparedRoot =
|
|
81716
|
+
const preparedRoot = import_node_fs103.default.realpathSync(options2.preparedRoot);
|
|
81585
81717
|
const rewritten = rewritePreparedPaths({
|
|
81586
81718
|
units: options2.units,
|
|
81587
81719
|
sourceRoot: options2.sourceRoot,
|
|
@@ -81589,8 +81721,8 @@ function writeExpoDiscovery(options2) {
|
|
|
81589
81721
|
signal: options2.signal
|
|
81590
81722
|
});
|
|
81591
81723
|
if ("refuse" in rewritten) return rewritten.refuse;
|
|
81592
|
-
const blobDir =
|
|
81593
|
-
|
|
81724
|
+
const blobDir = import_node_path107.default.join(dir, "blobs");
|
|
81725
|
+
import_node_fs103.default.mkdirSync(blobDir, { recursive: true });
|
|
81594
81726
|
const seen = /* @__PURE__ */ new Map();
|
|
81595
81727
|
const chunks = [];
|
|
81596
81728
|
let size2 = 0;
|
|
@@ -81629,14 +81761,14 @@ function writeExpoDiscovery(options2) {
|
|
|
81629
81761
|
);
|
|
81630
81762
|
const contents2 = (0, import_node_zlib7.zstdCompressSync)(Buffer.concat(chunks, size2));
|
|
81631
81763
|
const archive = (0, import_node_crypto62.createHash)("sha256").update(contents2).digest("hex");
|
|
81632
|
-
const temporary =
|
|
81764
|
+
const temporary = import_node_path107.default.join(blobDir, "." + (0, import_node_crypto62.randomUUID)() + ".tmp");
|
|
81633
81765
|
try {
|
|
81634
|
-
|
|
81635
|
-
|
|
81766
|
+
import_node_fs103.default.writeFileSync(temporary, contents2);
|
|
81767
|
+
import_node_fs103.default.renameSync(temporary, import_node_path107.default.join(blobDir, `${archive}.zst`));
|
|
81636
81768
|
} finally {
|
|
81637
|
-
|
|
81769
|
+
import_node_fs103.default.rmSync(temporary, { force: true });
|
|
81638
81770
|
}
|
|
81639
|
-
|
|
81771
|
+
import_node_fs103.default.writeFileSync(
|
|
81640
81772
|
tmp,
|
|
81641
81773
|
JSON.stringify({
|
|
81642
81774
|
format: FORMAT,
|
|
@@ -81647,8 +81779,8 @@ function writeExpoDiscovery(options2) {
|
|
|
81647
81779
|
frameworks: rewritten.frameworks
|
|
81648
81780
|
})
|
|
81649
81781
|
);
|
|
81650
|
-
|
|
81651
|
-
expireDiscovery(dir,
|
|
81782
|
+
import_node_fs103.default.renameSync(tmp, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
81783
|
+
expireDiscovery(dir, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
81652
81784
|
saveFileHashes();
|
|
81653
81785
|
return rewritten.units;
|
|
81654
81786
|
} catch (error) {
|
|
@@ -81656,13 +81788,13 @@ function writeExpoDiscovery(options2) {
|
|
|
81656
81788
|
return error instanceof Error ? error.message : String(error);
|
|
81657
81789
|
}
|
|
81658
81790
|
}
|
|
81659
|
-
var import_node_crypto62,
|
|
81791
|
+
var import_node_crypto62, import_node_fs103, import_node_path107, import_node_zlib7, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
|
|
81660
81792
|
var init_expo_discovery_cache = __esm({
|
|
81661
81793
|
"src/expo-discovery-cache.ts"() {
|
|
81662
81794
|
"use strict";
|
|
81663
81795
|
import_node_crypto62 = require("node:crypto");
|
|
81664
|
-
|
|
81665
|
-
|
|
81796
|
+
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
81797
|
+
import_node_path107 = __toESM(require("node:path"), 1);
|
|
81666
81798
|
import_node_zlib7 = require("node:zlib");
|
|
81667
81799
|
init_expo_eager_seam_contract();
|
|
81668
81800
|
init_answeredNativePackages();
|
|
@@ -81705,7 +81837,7 @@ function isExpoSwiftCompilationResult(value) {
|
|
|
81705
81837
|
if (value.bridgeModules !== void 0 && (!strings3(value.bridgeModules) || !value.bridgeModules.every((name3) => remaining.has(name3))))
|
|
81706
81838
|
return false;
|
|
81707
81839
|
for (const artifact of value.modules) {
|
|
81708
|
-
if (!isRecord(artifact) || !strings3(artifact.namespaces) || artifact.namespaces.length === 0 || !artifact.namespaces.every((namespace) => remaining.delete(namespace)) || typeof artifact.url !== "string" || typeof artifact.hash !== "string" || typeof artifact.icuUrl !== "string" || typeof artifact.rootId !== "string" || artifact.bundleFiles !== void 0 && (!isRecord(artifact.bundleFiles) || !Object.entries(artifact.bundleFiles).every(
|
|
81840
|
+
if (!isRecord(artifact) || !strings3(artifact.namespaces) || artifact.namespaces.length === 0 || !artifact.namespaces.every((namespace) => remaining.delete(namespace)) || typeof artifact.url !== "string" || !(artifact.sdkUrl === void 0 && artifact.sdkBindingUrl === void 0 || typeof artifact.sdkUrl === "string" && artifact.sdkUrl.length > 0 && typeof artifact.sdkBindingUrl === "string" && artifact.sdkBindingUrl.length > 0) || typeof artifact.hash !== "string" || typeof artifact.icuUrl !== "string" || typeof artifact.rootId !== "string" || artifact.bundleFiles !== void 0 && (!isRecord(artifact.bundleFiles) || !Object.entries(artifact.bundleFiles).every(
|
|
81709
81841
|
([key2, bytes]) => isSwiftResourcePath(key2) && typeof bytes === "string"
|
|
81710
81842
|
)))
|
|
81711
81843
|
return false;
|
|
@@ -81816,7 +81948,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
81816
81948
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary3.RTCAppGroupIdentifier);
|
|
81817
81949
|
const screenShareExtensionBundleId = typeof dictionary3.ScreenShareExtensionBundleId === "string" ? dictionary3.ScreenShareExtensionBundleId : void 0;
|
|
81818
81950
|
const rootModuleName = readRootModuleName(
|
|
81819
|
-
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) &&
|
|
81951
|
+
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs104.default.existsSync(file)).map((file) => import_node_fs104.default.readFileSync(file, "utf8"))
|
|
81820
81952
|
);
|
|
81821
81953
|
const identity2 = {
|
|
81822
81954
|
...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
|
|
@@ -81840,7 +81972,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
81840
81972
|
googleSignIn: readGoogleSignInConfiguration(
|
|
81841
81973
|
dictionary3,
|
|
81842
81974
|
Object.fromEntries(
|
|
81843
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(
|
|
81975
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(import_node_fs104.default.readFileSync(file), parseInfoPlist)])
|
|
81844
81976
|
)
|
|
81845
81977
|
),
|
|
81846
81978
|
supportedInterfaceOrientations,
|
|
@@ -81850,11 +81982,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
81850
81982
|
bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
|
|
81851
81983
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
81852
81984
|
app.resources,
|
|
81853
|
-
(file) =>
|
|
81985
|
+
(file) => import_node_fs104.default.readFileSync(file, "utf8"),
|
|
81854
81986
|
(file) => {
|
|
81855
|
-
const extension =
|
|
81987
|
+
const extension = import_node_path108.default.extname(file).toLowerCase();
|
|
81856
81988
|
const contentType2 = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
81857
|
-
return `data:${contentType2};base64,${
|
|
81989
|
+
return `data:${contentType2};base64,${import_node_fs104.default.readFileSync(file).toString("base64")}`;
|
|
81858
81990
|
},
|
|
81859
81991
|
icons,
|
|
81860
81992
|
app.appIconName,
|
|
@@ -81883,13 +82015,13 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
|
81883
82015
|
environment
|
|
81884
82016
|
});
|
|
81885
82017
|
}
|
|
81886
|
-
var
|
|
82018
|
+
var import_node_fs104, import_node_module11, import_node_path108, SDK_BEFORE_SCENE_REQUIREMENT;
|
|
81887
82019
|
var init_native_app_identity_project = __esm({
|
|
81888
82020
|
"src/native-app-identity-project.ts"() {
|
|
81889
82021
|
"use strict";
|
|
81890
|
-
|
|
82022
|
+
import_node_fs104 = __toESM(require("node:fs"), 1);
|
|
81891
82023
|
import_node_module11 = require("node:module");
|
|
81892
|
-
|
|
82024
|
+
import_node_path108 = __toESM(require("node:path"), 1);
|
|
81893
82025
|
init_android_app_identity();
|
|
81894
82026
|
init_is_record();
|
|
81895
82027
|
init_native_app_identity();
|
|
@@ -81905,8 +82037,8 @@ var init_native_app_identity_project = __esm({
|
|
|
81905
82037
|
|
|
81906
82038
|
// src/native-firebase-config.ts
|
|
81907
82039
|
function hasExpoConfig(projectRoot) {
|
|
81908
|
-
const packagePath =
|
|
81909
|
-
const manifest =
|
|
82040
|
+
const packagePath = import_node_path109.default.join(projectRoot, "package.json");
|
|
82041
|
+
const manifest = import_node_fs105.default.existsSync(packagePath) ? JSON.parse(import_node_fs105.default.readFileSync(packagePath, "utf8")) : null;
|
|
81910
82042
|
if (isRecord(manifest)) {
|
|
81911
82043
|
const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
|
|
81912
82044
|
isRecord
|
|
@@ -81914,13 +82046,13 @@ function hasExpoConfig(projectRoot) {
|
|
|
81914
82046
|
if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
|
|
81915
82047
|
return false;
|
|
81916
82048
|
}
|
|
81917
|
-
const appJsonPath =
|
|
81918
|
-
const appJson =
|
|
82049
|
+
const appJsonPath = import_node_path109.default.join(projectRoot, "app.json");
|
|
82050
|
+
const appJson = import_node_fs105.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs105.default.readFileSync(appJsonPath, "utf8")) : null;
|
|
81919
82051
|
const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
81920
82052
|
(value) => isRecord(value) && typeof value.googleServicesFile === "string"
|
|
81921
82053
|
));
|
|
81922
82054
|
return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
|
|
81923
|
-
(name3) =>
|
|
82055
|
+
(name3) => import_node_fs105.default.existsSync(import_node_path109.default.join(projectRoot, name3))
|
|
81924
82056
|
);
|
|
81925
82057
|
}
|
|
81926
82058
|
function expoConfigArgs(projectRoot, resultPath) {
|
|
@@ -81928,7 +82060,7 @@ function expoConfigArgs(projectRoot, resultPath) {
|
|
|
81928
82060
|
"--input-type=commonjs",
|
|
81929
82061
|
"-e",
|
|
81930
82062
|
EXPO_CONFIG_SCRIPT,
|
|
81931
|
-
|
|
82063
|
+
import_node_path109.default.resolve(projectRoot),
|
|
81932
82064
|
resultPath
|
|
81933
82065
|
];
|
|
81934
82066
|
}
|
|
@@ -81941,14 +82073,14 @@ function readExpoConfigResult(resultPath, status, signal, stderr) {
|
|
|
81941
82073
|
throw new Error(
|
|
81942
82074
|
stderr || (signal ? `Expo native configuration evaluation was killed by ${signal}.` : "Expo native configuration evaluation failed.")
|
|
81943
82075
|
);
|
|
81944
|
-
const resolved = JSON.parse(
|
|
82076
|
+
const resolved = JSON.parse(import_node_fs105.default.readFileSync(resultPath, "utf8"));
|
|
81945
82077
|
if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
|
|
81946
82078
|
return resolved;
|
|
81947
82079
|
}
|
|
81948
82080
|
async function readExpoConfigAsync(projectRoot) {
|
|
81949
82081
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
81950
82082
|
const directory2 = resultDirectory();
|
|
81951
|
-
const resultPath =
|
|
82083
|
+
const resultPath = import_node_path109.default.join(directory2, "config.json");
|
|
81952
82084
|
try {
|
|
81953
82085
|
const child = (0, import_node_child_process49.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
81954
82086
|
cwd: projectRoot,
|
|
@@ -81968,18 +82100,18 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
81968
82100
|
);
|
|
81969
82101
|
return readExpoConfigResult(resultPath, status, signal, stderr);
|
|
81970
82102
|
} finally {
|
|
81971
|
-
|
|
82103
|
+
import_node_fs105.default.rmSync(directory2, { recursive: true, force: true });
|
|
81972
82104
|
}
|
|
81973
82105
|
}
|
|
81974
|
-
var import_node_child_process49,
|
|
82106
|
+
var import_node_child_process49, import_node_fs105, import_node_module12, import_node_os22, import_node_path109, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory;
|
|
81975
82107
|
var init_native_firebase_config = __esm({
|
|
81976
82108
|
"src/native-firebase-config.ts"() {
|
|
81977
82109
|
"use strict";
|
|
81978
82110
|
import_node_child_process49 = require("node:child_process");
|
|
81979
|
-
|
|
82111
|
+
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
81980
82112
|
import_node_module12 = require("node:module");
|
|
81981
82113
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
81982
|
-
|
|
82114
|
+
import_node_path109 = __toESM(require("node:path"), 1);
|
|
81983
82115
|
init_is_record();
|
|
81984
82116
|
init_plist();
|
|
81985
82117
|
init_xcode_project();
|
|
@@ -82000,7 +82132,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
82000
82132
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
82001
82133
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
82002
82134
|
EXPO_CONFIG_TIMEOUT_MS = 3e4;
|
|
82003
|
-
resultDirectory = () =>
|
|
82135
|
+
resultDirectory = () => import_node_fs105.default.mkdtempSync(import_node_path109.default.join(import_node_os22.default.tmpdir(), "peach-expo-config-"));
|
|
82004
82136
|
}
|
|
82005
82137
|
});
|
|
82006
82138
|
|
|
@@ -82102,12 +82234,12 @@ var init_nitroContract = __esm({
|
|
|
82102
82234
|
function hashPackageTree(root, options2) {
|
|
82103
82235
|
const files2 = [];
|
|
82104
82236
|
const walk4 = (directory2, relative6) => {
|
|
82105
|
-
for (const entry of (0,
|
|
82237
|
+
for (const entry of (0, import_node_fs106.readdirSync)(directory2, { withFileTypes: true }).sort(
|
|
82106
82238
|
(a, b) => options2.compareNames(a.name, b.name)
|
|
82107
82239
|
)) {
|
|
82108
82240
|
if (entry.name === "node_modules") continue;
|
|
82109
82241
|
const path168 = `${relative6}${entry.name}`;
|
|
82110
|
-
if (entry.isDirectory()) walk4((0,
|
|
82242
|
+
if (entry.isDirectory()) walk4((0, import_node_path110.join)(directory2, entry.name), `${path168}/`);
|
|
82111
82243
|
else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path168);
|
|
82112
82244
|
}
|
|
82113
82245
|
};
|
|
@@ -82116,7 +82248,7 @@ function hashPackageTree(root, options2) {
|
|
|
82116
82248
|
return (async () => {
|
|
82117
82249
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
82118
82250
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
82119
|
-
const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0,
|
|
82251
|
+
const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0, import_node_path110.join)(root, file))));
|
|
82120
82252
|
batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
|
|
82121
82253
|
}
|
|
82122
82254
|
return hash.digest("hex");
|
|
@@ -82133,14 +82265,14 @@ function nativePackageTreeDigest(root) {
|
|
|
82133
82265
|
skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
|
|
82134
82266
|
});
|
|
82135
82267
|
}
|
|
82136
|
-
var import_node_crypto63,
|
|
82268
|
+
var import_node_crypto63, import_node_fs106, import_promises12, import_node_path110, READ_AHEAD;
|
|
82137
82269
|
var init_package_tree_digest = __esm({
|
|
82138
82270
|
"src/package-tree-digest.ts"() {
|
|
82139
82271
|
"use strict";
|
|
82140
82272
|
import_node_crypto63 = require("node:crypto");
|
|
82141
|
-
|
|
82273
|
+
import_node_fs106 = require("node:fs");
|
|
82142
82274
|
import_promises12 = require("node:fs/promises");
|
|
82143
|
-
|
|
82275
|
+
import_node_path110 = require("node:path");
|
|
82144
82276
|
READ_AHEAD = 64;
|
|
82145
82277
|
}
|
|
82146
82278
|
});
|
|
@@ -82166,16 +82298,16 @@ function packageRootOf(appRoot, file) {
|
|
|
82166
82298
|
if (parts2[0] !== "node_modules") return null;
|
|
82167
82299
|
const at = parts2.lastIndexOf("node_modules") + 1;
|
|
82168
82300
|
const end = at + (parts2[at]?.startsWith("@") ? 2 : 1);
|
|
82169
|
-
return parts2.length > end ?
|
|
82301
|
+
return parts2.length > end ? import_node_path111.default.join(appRoot, ...parts2.slice(0, end)) : null;
|
|
82170
82302
|
}
|
|
82171
82303
|
async function expoNativeInputs(appRoot) {
|
|
82172
|
-
appRoot =
|
|
82173
|
-
if (findXcodeProject(
|
|
82174
|
-
const appRequire = (0, import_node_module13.createRequire)(
|
|
82304
|
+
appRoot = import_node_fs107.default.realpathSync(appRoot);
|
|
82305
|
+
if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
|
|
82306
|
+
const appRequire = (0, import_node_module13.createRequire)(import_node_path111.default.join(appRoot, "package.json"));
|
|
82175
82307
|
let fingerprintEntry;
|
|
82176
82308
|
try {
|
|
82177
82309
|
fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
|
|
82178
|
-
paths: [
|
|
82310
|
+
paths: [import_node_path111.default.dirname(appRequire.resolve("expo/package.json"))]
|
|
82179
82311
|
});
|
|
82180
82312
|
} catch {
|
|
82181
82313
|
return null;
|
|
@@ -82201,7 +82333,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
82201
82333
|
const root = (source.type === "package" || source.type === "dir") && source.filePath ? packageRootOf(appRoot, source.filePath) : null;
|
|
82202
82334
|
if (!root) continue;
|
|
82203
82335
|
const manifest = JSON.parse(
|
|
82204
|
-
|
|
82336
|
+
import_node_fs107.default.readFileSync(import_node_path111.default.join(root, "package.json"), "utf8")
|
|
82205
82337
|
);
|
|
82206
82338
|
if (!isRecord(manifest) || typeof manifest.name !== "string")
|
|
82207
82339
|
throw new Error(`${root}: package has no name`);
|
|
@@ -82209,7 +82341,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
82209
82341
|
}
|
|
82210
82342
|
packages.set(
|
|
82211
82343
|
"react-native",
|
|
82212
|
-
|
|
82344
|
+
import_node_path111.default.dirname(appRequire.resolve("react-native/package.json"))
|
|
82213
82345
|
);
|
|
82214
82346
|
return {
|
|
82215
82347
|
inputs: {
|
|
@@ -82270,7 +82402,7 @@ function readExpoNativeEntry(value) {
|
|
|
82270
82402
|
};
|
|
82271
82403
|
}
|
|
82272
82404
|
async function answer(appRoot) {
|
|
82273
|
-
if (findXcodeProject(
|
|
82405
|
+
if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
|
|
82274
82406
|
const [source, config] = await Promise.all([
|
|
82275
82407
|
hashExpoSourceWorkspace(appRoot),
|
|
82276
82408
|
readExpoConfigAsync(appRoot)
|
|
@@ -82300,7 +82432,7 @@ async function lookup2(appRoot) {
|
|
|
82300
82432
|
}
|
|
82301
82433
|
function prebuiltExpoNative(appRoot, iosTarget) {
|
|
82302
82434
|
if (iosTarget !== void 0) return Promise.resolve(null);
|
|
82303
|
-
const root =
|
|
82435
|
+
const root = import_node_fs107.default.realpathSync(appRoot);
|
|
82304
82436
|
let pending2 = lookups.get(root);
|
|
82305
82437
|
if (!pending2) {
|
|
82306
82438
|
pending2 = answer(root).finally(() => lookups.delete(root));
|
|
@@ -82310,20 +82442,20 @@ function prebuiltExpoNative(appRoot, iosTarget) {
|
|
|
82310
82442
|
}
|
|
82311
82443
|
async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
|
|
82312
82444
|
const prepared = await prepareExpoNativeProject(
|
|
82313
|
-
|
|
82445
|
+
import_node_fs107.default.realpathSync(appRoot),
|
|
82314
82446
|
signal,
|
|
82315
82447
|
dependencies
|
|
82316
82448
|
);
|
|
82317
|
-
const ios =
|
|
82318
|
-
const projects2 =
|
|
82449
|
+
const ios = import_node_path111.default.join(prepared.app, "ios");
|
|
82450
|
+
const projects2 = import_node_fs107.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcodeproj"));
|
|
82319
82451
|
if (projects2.length !== 1) throw new Error(`expected one Xcode project in ${ios}`);
|
|
82320
|
-
return readXcodeAppTarget(
|
|
82452
|
+
return readXcodeAppTarget(import_node_path111.default.join(ios, projects2[0]), void 0, "Debug", {
|
|
82321
82453
|
requireSources: false
|
|
82322
82454
|
});
|
|
82323
82455
|
}
|
|
82324
82456
|
function isManagedExpoApp(appRoot) {
|
|
82325
|
-
return !findXcodeProject(
|
|
82326
|
-
JSON.parse(
|
|
82457
|
+
return !findXcodeProject(import_node_path111.default.join(appRoot, "ios")) && declaresNativeDependency(
|
|
82458
|
+
JSON.parse(import_node_fs107.default.readFileSync(import_node_path111.default.join(appRoot, "package.json"), "utf8")),
|
|
82327
82459
|
"expo"
|
|
82328
82460
|
);
|
|
82329
82461
|
}
|
|
@@ -82335,7 +82467,7 @@ async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
|
|
|
82335
82467
|
}
|
|
82336
82468
|
function servedExpoSwift(appRoot, entry, app) {
|
|
82337
82469
|
if (!entry.expoSwift) return null;
|
|
82338
|
-
const rootId = `${(0, import_node_crypto64.createHash)("sha256").update(
|
|
82470
|
+
const rootId = `${(0, import_node_crypto64.createHash)("sha256").update(import_node_fs107.default.realpathSync(appRoot)).digest("hex")}/Expo`;
|
|
82339
82471
|
if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
|
|
82340
82472
|
const installed2 = installedInfoPlist(app.infoPlist, entry.infoPlist);
|
|
82341
82473
|
const infoPlist2 = Buffer.from(installed2).toString("base64");
|
|
@@ -82363,14 +82495,14 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
82363
82495
|
await prebuiltAppTarget(appRoot, signal, "installed")
|
|
82364
82496
|
);
|
|
82365
82497
|
}
|
|
82366
|
-
var import_node_crypto64,
|
|
82498
|
+
var import_node_crypto64, import_node_fs107, import_node_module13, import_node_path111, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
|
|
82367
82499
|
var init_expo_native_prebuilt = __esm({
|
|
82368
82500
|
"src/expo-native-prebuilt.ts"() {
|
|
82369
82501
|
"use strict";
|
|
82370
82502
|
import_node_crypto64 = require("node:crypto");
|
|
82371
|
-
|
|
82503
|
+
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
82372
82504
|
import_node_module13 = require("node:module");
|
|
82373
|
-
|
|
82505
|
+
import_node_path111 = __toESM(require("node:path"), 1);
|
|
82374
82506
|
import_node_util14 = require("node:util");
|
|
82375
82507
|
init_answeredNativePackages();
|
|
82376
82508
|
init_expo_native_compiler_digest();
|
|
@@ -82398,8 +82530,8 @@ var init_expo_native_prebuilt = __esm({
|
|
|
82398
82530
|
|
|
82399
82531
|
// src/native-preparation.ts
|
|
82400
82532
|
function ignoredChange(relative6) {
|
|
82401
|
-
const parts2 = relative6.split(
|
|
82402
|
-
return relative6 ===
|
|
82533
|
+
const parts2 = relative6.split(import_node_path112.default.sep);
|
|
82534
|
+
return relative6 === import_node_path112.default.join(".git", "index") || parts2.includes(".cache") || parts2.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
|
|
82403
82535
|
relative6
|
|
82404
82536
|
);
|
|
82405
82537
|
}
|
|
@@ -82421,7 +82553,7 @@ function watchNativeInputs(root) {
|
|
|
82421
82553
|
}
|
|
82422
82554
|
const inputs2 = { expiry, revision: (0, import_node_crypto65.randomUUID)() };
|
|
82423
82555
|
const watch3 = (directory2, recursive, name3) => {
|
|
82424
|
-
const watcher =
|
|
82556
|
+
const watcher = import_node_fs108.default.watch(
|
|
82425
82557
|
directory2,
|
|
82426
82558
|
{ recursive, persistent: false },
|
|
82427
82559
|
(_event, file) => {
|
|
@@ -82434,17 +82566,17 @@ function watchNativeInputs(root) {
|
|
|
82434
82566
|
const scan3 = (directory2, watchRoot2) => {
|
|
82435
82567
|
if (visited.has(directory2)) return;
|
|
82436
82568
|
visited.add(directory2);
|
|
82437
|
-
for (const entry of
|
|
82438
|
-
const file =
|
|
82439
|
-
if (ignoredChange(
|
|
82569
|
+
for (const entry of import_node_fs108.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
82570
|
+
const file = import_node_path112.default.join(directory2, entry.name);
|
|
82571
|
+
if (ignoredChange(import_node_path112.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
|
|
82440
82572
|
if (entry.isDirectory()) scan3(file, watchRoot2);
|
|
82441
82573
|
if (!entry.isSymbolicLink()) continue;
|
|
82442
|
-
const target =
|
|
82443
|
-
if (target === workspace || target.startsWith(workspace +
|
|
82444
|
-
const real =
|
|
82574
|
+
const target = import_node_path112.default.resolve(directory2, import_node_fs108.default.readlinkSync(file));
|
|
82575
|
+
if (target === workspace || target.startsWith(workspace + import_node_path112.default.sep)) continue;
|
|
82576
|
+
const real = import_node_fs108.default.realpathSync(file);
|
|
82445
82577
|
if (visited.has(real)) continue;
|
|
82446
|
-
watch3(
|
|
82447
|
-
if (
|
|
82578
|
+
watch3(import_node_path112.default.dirname(real), false, import_node_path112.default.basename(real));
|
|
82579
|
+
if (import_node_fs108.default.statSync(real).isDirectory()) {
|
|
82448
82580
|
watch3(real, true);
|
|
82449
82581
|
scan3(real, real);
|
|
82450
82582
|
} else visited.add(real);
|
|
@@ -82464,13 +82596,13 @@ function nativeInputRevision(root) {
|
|
|
82464
82596
|
const inputs2 = watchNativeInputs(root);
|
|
82465
82597
|
if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
|
|
82466
82598
|
}
|
|
82467
|
-
var import_node_crypto65,
|
|
82599
|
+
var import_node_crypto65, import_node_fs108, import_node_path112, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
82468
82600
|
var init_native_preparation = __esm({
|
|
82469
82601
|
"src/native-preparation.ts"() {
|
|
82470
82602
|
"use strict";
|
|
82471
82603
|
import_node_crypto65 = require("node:crypto");
|
|
82472
|
-
|
|
82473
|
-
|
|
82604
|
+
import_node_fs108 = __toESM(require("node:fs"), 1);
|
|
82605
|
+
import_node_path112 = __toESM(require("node:path"), 1);
|
|
82474
82606
|
import_node_timers2 = require("node:timers");
|
|
82475
82607
|
init_nativePreparationContract();
|
|
82476
82608
|
init_runtime_assets();
|
|
@@ -82534,87 +82666,6 @@ var init_native_preparation = __esm({
|
|
|
82534
82666
|
}
|
|
82535
82667
|
});
|
|
82536
82668
|
|
|
82537
|
-
// src/swift-xcframework.ts
|
|
82538
|
-
function simulatorNativeLibrary(dir) {
|
|
82539
|
-
if (dir.endsWith(".framework")) {
|
|
82540
|
-
const name3 = import_node_path112.default.basename(dir, ".framework");
|
|
82541
|
-
return { name: name3, file: import_node_path112.default.join(dir, name3), kind: "framework" };
|
|
82542
|
-
}
|
|
82543
|
-
if (!dir.endsWith(".xcframework")) return null;
|
|
82544
|
-
const info = parsePlistBytes(import_node_fs108.default.readFileSync(import_node_path112.default.join(dir, "Info.plist")));
|
|
82545
|
-
if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
|
|
82546
|
-
throw new Error(`${dir}: invalid XCFramework library declarations`);
|
|
82547
|
-
const matches = [];
|
|
82548
|
-
for (const entry of info.AvailableLibraries) {
|
|
82549
|
-
if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
|
|
82550
|
-
if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
|
|
82551
|
-
continue;
|
|
82552
|
-
if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
|
|
82553
|
-
throw new Error(`${dir}: invalid simulator library paths`);
|
|
82554
|
-
const archive = /\.a$/.test(entry.LibraryPath);
|
|
82555
|
-
const framework = /\.framework$/.test(entry.LibraryPath);
|
|
82556
|
-
if (!archive && !framework) continue;
|
|
82557
|
-
const bundle = import_node_path112.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
|
|
82558
|
-
const bundleRelative = import_node_path112.default.relative(dir, bundle);
|
|
82559
|
-
if (bundleRelative.startsWith("..") || import_node_path112.default.isAbsolute(bundleRelative))
|
|
82560
|
-
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
82561
|
-
let name3 = entry.LibraryPath;
|
|
82562
|
-
let file = bundle;
|
|
82563
|
-
if (framework) {
|
|
82564
|
-
name3 = import_node_path112.default.basename(bundle, ".framework");
|
|
82565
|
-
file = import_node_path112.default.join(bundle, name3);
|
|
82566
|
-
}
|
|
82567
|
-
const relative6 = import_node_path112.default.relative(dir, file);
|
|
82568
|
-
if (relative6.startsWith("..") || import_node_path112.default.isAbsolute(relative6))
|
|
82569
|
-
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
82570
|
-
if (framework) {
|
|
82571
|
-
matches.push({ name: name3, file, kind: "framework" });
|
|
82572
|
-
continue;
|
|
82573
|
-
}
|
|
82574
|
-
const slice = import_node_path112.default.resolve(dir, entry.LibraryIdentifier);
|
|
82575
|
-
const headers = typeof entry.HeadersPath === "string" ? import_node_path112.default.resolve(slice, entry.HeadersPath) : void 0;
|
|
82576
|
-
if (headers && relativeInside(slice, headers) === null)
|
|
82577
|
-
throw new Error(`${dir}: headers escape their XCFramework slice`);
|
|
82578
|
-
matches.push({ name: name3, file, kind: "archive", headers });
|
|
82579
|
-
}
|
|
82580
|
-
if (matches.length === 0) return null;
|
|
82581
|
-
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
82582
|
-
return matches[0];
|
|
82583
|
-
}
|
|
82584
|
-
function isDynamicLibrary2(file) {
|
|
82585
|
-
const fd = import_node_fs108.default.openSync(file, "r");
|
|
82586
|
-
try {
|
|
82587
|
-
const read2 = (offset) => {
|
|
82588
|
-
const bytes = Buffer.alloc(16);
|
|
82589
|
-
import_node_fs108.default.readSync(fd, bytes, 0, 16, offset);
|
|
82590
|
-
return bytes;
|
|
82591
|
-
};
|
|
82592
|
-
let header = read2(0);
|
|
82593
|
-
const universal = header.readUInt32BE(0);
|
|
82594
|
-
if (universal === 3405691582 || universal === 3405691583) {
|
|
82595
|
-
const arch = read2(8);
|
|
82596
|
-
header = read2(
|
|
82597
|
-
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
82598
|
-
);
|
|
82599
|
-
}
|
|
82600
|
-
const magic = header.readUInt32LE(0);
|
|
82601
|
-
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
82602
|
-
} finally {
|
|
82603
|
-
import_node_fs108.default.closeSync(fd);
|
|
82604
|
-
}
|
|
82605
|
-
}
|
|
82606
|
-
var import_node_fs108, import_node_path112;
|
|
82607
|
-
var init_swift_xcframework = __esm({
|
|
82608
|
-
"src/swift-xcframework.ts"() {
|
|
82609
|
-
"use strict";
|
|
82610
|
-
import_node_fs108 = __toESM(require("node:fs"), 1);
|
|
82611
|
-
import_node_path112 = __toESM(require("node:path"), 1);
|
|
82612
|
-
init_is_record();
|
|
82613
|
-
init_plist_bytes();
|
|
82614
|
-
init_swift_source_file();
|
|
82615
|
-
}
|
|
82616
|
-
});
|
|
82617
|
-
|
|
82618
82669
|
// src/native-static-libraries.ts
|
|
82619
82670
|
function nonmodularFrameworkLibraries(directories, moduleRoot) {
|
|
82620
82671
|
return [
|
|
@@ -103867,6 +103918,17 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
|
103867
103918
|
sdkBindingUrl: `${origin}${SDK_BINDING_PATH}${servedSdkBinding(image.sdk, published4?.dataPlan ?? sdkDigest)}.bin`
|
|
103868
103919
|
};
|
|
103869
103920
|
}
|
|
103921
|
+
async function prepareSwiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
103922
|
+
if (image.sdk && !image.hostedSdk) {
|
|
103923
|
+
const published4 = publishedSwiftSdk(image.sdk.sha256);
|
|
103924
|
+
if (published4?.dataPlan) {
|
|
103925
|
+
const { fetchSwiftSdkDataPlan: fetchSwiftSdkDataPlan2 } = await Promise.resolve().then(() => (init_swift_sdk_later_data(), swift_sdk_later_data_exports));
|
|
103926
|
+
const plan = await fetchSwiftSdkDataPlan2(published4);
|
|
103927
|
+
if (plan) await splitSdkBinding(image.sdk, published4.dataPlan, plan);
|
|
103928
|
+
}
|
|
103929
|
+
}
|
|
103930
|
+
return swiftSdkEntryAssets(origin, image, sdkDigest);
|
|
103931
|
+
}
|
|
103870
103932
|
function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch, runtimeRootOverride) {
|
|
103871
103933
|
const { key: key2 } = sdk2;
|
|
103872
103934
|
const normalizedPackage = normalizedSwiftPackagePath(packagePath);
|
|
@@ -104839,7 +104901,7 @@ var init_installed_native_libraries = __esm({
|
|
|
104839
104901
|
// src/turbo-codegen-intake.ts
|
|
104840
104902
|
function installedRendererDependencyGlobs(reactNativeRoot, appRoot) {
|
|
104841
104903
|
return Object.fromEntries(
|
|
104842
|
-
|
|
104904
|
+
RENDERER_DEPENDENCY_PODS.map((name3) => {
|
|
104843
104905
|
const spec = loadPodspec(
|
|
104844
104906
|
import_node_path140.default.join(reactNativeRoot, "third-party-podspecs", `${name3}.podspec`),
|
|
104845
104907
|
appRoot
|
|
@@ -104957,7 +105019,7 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
104957
105019
|
files: hashTree(generatedRoot)
|
|
104958
105020
|
};
|
|
104959
105021
|
}
|
|
104960
|
-
var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run11, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
105022
|
+
var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run11, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
104961
105023
|
var init_turbo_codegen_intake = __esm({
|
|
104962
105024
|
"src/turbo-codegen-intake.ts"() {
|
|
104963
105025
|
"use strict";
|
|
@@ -104972,6 +105034,7 @@ var init_turbo_codegen_intake = __esm({
|
|
|
104972
105034
|
init_nitro_source();
|
|
104973
105035
|
init_podspec_sources();
|
|
104974
105036
|
run11 = (0, import_node_util17.promisify)(import_node_child_process68.execFile);
|
|
105037
|
+
RENDERER_DEPENDENCY_PODS = ["RCT-Folly", "DoubleConversion", "fmt"];
|
|
104975
105038
|
RENDERER_PODS = /* @__PURE__ */ new Set([
|
|
104976
105039
|
"React-Fabric",
|
|
104977
105040
|
"React-FabricComponents",
|
|
@@ -105454,8 +105517,7 @@ function podspecDependencies(pod) {
|
|
|
105454
105517
|
if (!Array.isArray(requirements) || !requirements.every((item) => typeof item === "string"))
|
|
105455
105518
|
throw new Error(`${pod.file}: invalid requirements for ${name3}`);
|
|
105456
105519
|
const [root, ...subspec] = name3.split("/");
|
|
105457
|
-
if (root === pod.name ||
|
|
105458
|
-
continue;
|
|
105520
|
+
if (root === pod.name || reactNativePod(root)) continue;
|
|
105459
105521
|
const dep = deps.get(root) ?? { name: root, requirements: [], subspecs: [] };
|
|
105460
105522
|
dep.requirements.push(...requirements);
|
|
105461
105523
|
dep.subspecs.push(subspec.join("/"));
|
|
@@ -106043,7 +106105,7 @@ async function collectTurboSources(options2) {
|
|
|
106043
106105
|
...folly.defines
|
|
106044
106106
|
];
|
|
106045
106107
|
const defines = [...baseDefines, "RCT_NEW_ARCH_ENABLED=1", "RCT_REMOVE_LEGACY_ARCH=1"];
|
|
106046
|
-
const target = (name3, dependencies) => ({
|
|
106108
|
+
const target = (name3, dependencies, cxxDefines = defines) => ({
|
|
106047
106109
|
name: name3,
|
|
106048
106110
|
path: targetPath(name3),
|
|
106049
106111
|
executable: false,
|
|
@@ -106054,7 +106116,7 @@ async function collectTurboSources(options2) {
|
|
|
106054
106116
|
kind: "target",
|
|
106055
106117
|
name: dependency
|
|
106056
106118
|
})),
|
|
106057
|
-
cxxDefines
|
|
106119
|
+
cxxDefines
|
|
106058
106120
|
});
|
|
106059
106121
|
const result = {
|
|
106060
106122
|
coreMode: "turbo-cxx",
|
|
@@ -106108,6 +106170,9 @@ async function collectTurboSources(options2) {
|
|
|
106108
106170
|
const installedTargets = workspace && !options2.reactNativeCore && !options2.reactNativeProvider ? readXcodeAppTarget(workspace, void 0, "Release", {
|
|
106109
106171
|
installedPods: true
|
|
106110
106172
|
}).frameworks : [];
|
|
106173
|
+
const installedByIdentity = new Map(
|
|
106174
|
+
installedTargets.map((target2) => [target2.targetIdentity, target2])
|
|
106175
|
+
);
|
|
106111
106176
|
const fileFlags = new Map(
|
|
106112
106177
|
installedTargets.flatMap(
|
|
106113
106178
|
(target2) => Object.entries(target2.objc?.fileFlags ?? {}).map(
|
|
@@ -106259,6 +106324,18 @@ async function collectTurboSources(options2) {
|
|
|
106259
106324
|
const podHeaders = /* @__PURE__ */ new Map();
|
|
106260
106325
|
const podFileLists = /* @__PURE__ */ new Map();
|
|
106261
106326
|
const isHeaderFile = (file) => import_node_fs139.default.statSync(file, { throwIfNoEntry: false })?.isFile() ?? false;
|
|
106327
|
+
const installedDependencyHeader = (from, root, relative6) => {
|
|
106328
|
+
const provider = podHeaders.get(from.targetName);
|
|
106329
|
+
const providerFile = provider ? relativeInside(provider.root, import_node_path141.default.join(root, relative6)) : null;
|
|
106330
|
+
if (provider && providerFile !== null)
|
|
106331
|
+
return original(from.targetName, provider.label, provider.root, providerFile, false);
|
|
106332
|
+
for (const pod of installedHeaderPods) {
|
|
106333
|
+
const directory2 = relativeInside(options2.appRoot, pod.root);
|
|
106334
|
+
const file = directory2 === null ? null : relativeInside(directory2, relative6);
|
|
106335
|
+
if (file !== null) return original(from.targetName, pod.name, pod.root, file, false);
|
|
106336
|
+
}
|
|
106337
|
+
return original(from.targetName, "installed-dependency", root, relative6, false);
|
|
106338
|
+
};
|
|
106262
106339
|
const resolve11 = (from, include, quoted2) => {
|
|
106263
106340
|
if (quoted2) {
|
|
106264
106341
|
const relative6 = import_node_path141.default.posix.normalize(
|
|
@@ -106406,15 +106483,7 @@ async function collectTurboSources(options2) {
|
|
|
106406
106483
|
] : pod?.dependencyHeaderMaps.filter(({ flag }) => flag === "-I") ?? []) {
|
|
106407
106484
|
const relative6 = map2.headers.get(include);
|
|
106408
106485
|
if (relative6 === void 0) continue;
|
|
106409
|
-
|
|
106410
|
-
const root = relativeInside(options2.appRoot, candidate.root);
|
|
106411
|
-
const file = root === null ? null : relativeInside(root, relative6);
|
|
106412
|
-
return file === null ? [] : [{ pod: candidate, file }];
|
|
106413
|
-
})[0];
|
|
106414
|
-
alias(
|
|
106415
|
-
own2,
|
|
106416
|
-
owner ? original(from.targetName, owner.pod.name, owner.pod.root, owner.file, false) : original(from.targetName, "installed-dependency", map2.root, relative6, false)
|
|
106417
|
-
);
|
|
106486
|
+
alias(own2, installedDependencyHeader(from, map2.root, relative6));
|
|
106418
106487
|
return;
|
|
106419
106488
|
}
|
|
106420
106489
|
for (const search of pod?.dependencySearchPaths ?? []) {
|
|
@@ -106424,10 +106493,7 @@ async function collectTurboSources(options2) {
|
|
|
106424
106493
|
const relative6 = relativeInside(search.root, file);
|
|
106425
106494
|
if (relative6 === null)
|
|
106426
106495
|
throw new Error("installed dependency header escapes its workspace: " + candidate);
|
|
106427
|
-
alias(
|
|
106428
|
-
own2,
|
|
106429
|
-
original(from.targetName, "installed-dependency", search.root, relative6, false)
|
|
106430
|
-
);
|
|
106496
|
+
alias(own2, installedDependencyHeader(from, search.root, relative6));
|
|
106431
106497
|
return;
|
|
106432
106498
|
}
|
|
106433
106499
|
resolveDependency(include);
|
|
@@ -106544,16 +106610,18 @@ async function collectTurboSources(options2) {
|
|
|
106544
106610
|
for (const provider of providers) {
|
|
106545
106611
|
const targetName = providerTarget(provider.info.name);
|
|
106546
106612
|
const label = provider.info.name;
|
|
106547
|
-
const
|
|
106548
|
-
|
|
106549
|
-
|
|
106613
|
+
const providerDefines = provider.paper ? baseDefines : defines;
|
|
106614
|
+
const providerTargetInput = target(
|
|
106615
|
+
targetName,
|
|
106616
|
+
[TURBO_CORE_TARGET],
|
|
106617
|
+
providerDefines
|
|
106618
|
+
);
|
|
106550
106619
|
result.targets.push(providerTargetInput);
|
|
106551
106620
|
const pod = readPod(
|
|
106552
106621
|
provider,
|
|
106553
106622
|
options2.appRoot,
|
|
106554
106623
|
options2.installedPods?.get(provider.name)
|
|
106555
106624
|
);
|
|
106556
|
-
if (provider.paper) providerTargetInput.cxxDefines = baseDefines;
|
|
106557
106625
|
if (pod.installed)
|
|
106558
106626
|
providerTargetInput.clangSettings = [
|
|
106559
106627
|
{ tool: "c", flags: pod.installed.preprocessorFlags.c },
|
|
@@ -106694,7 +106762,9 @@ async function collectTurboSources(options2) {
|
|
|
106694
106762
|
const depUnits = [];
|
|
106695
106763
|
const depSwiftPods = [];
|
|
106696
106764
|
const externalDefines = [];
|
|
106697
|
-
|
|
106765
|
+
const dependencies = podspecDependencies(pod);
|
|
106766
|
+
const seenDependencies = /* @__PURE__ */ new Set([pod.name, ...dependencies.map(({ name: name3 }) => name3)]);
|
|
106767
|
+
for (const dep of dependencies) {
|
|
106698
106768
|
const installed2 = installedHeaderPods.find(
|
|
106699
106769
|
(candidate) => candidate.name === dep.name
|
|
106700
106770
|
);
|
|
@@ -106728,6 +106798,13 @@ async function collectTurboSources(options2) {
|
|
|
106728
106798
|
if (!resolved) continue;
|
|
106729
106799
|
if (provider.reactModulesOnly && resolved.files.some((f) => f.endsWith(".swift")))
|
|
106730
106800
|
continue;
|
|
106801
|
+
for (const identity2 of installedTarget?.targetDependencies ?? []) {
|
|
106802
|
+
const dependency = installedByIdentity.get(identity2);
|
|
106803
|
+
if (!dependency?.podRoot || seenDependencies.has(dependency.name) || reactNativePod(dependency.name))
|
|
106804
|
+
continue;
|
|
106805
|
+
seenDependencies.add(dependency.name);
|
|
106806
|
+
dependencies.push({ name: dependency.name, requirements: [], subspecs: [""] });
|
|
106807
|
+
}
|
|
106731
106808
|
externalDefines.push(...resolved.defines);
|
|
106732
106809
|
const mappings2 = installed2 ? podHeaderMappings(installed2) : [];
|
|
106733
106810
|
const swiftFilesForDep = [];
|
|
@@ -106805,7 +106882,8 @@ async function collectTurboSources(options2) {
|
|
|
106805
106882
|
result.targets.push({
|
|
106806
106883
|
...target(
|
|
106807
106884
|
swiftModule,
|
|
106808
|
-
depSwiftPods.map((dep) => dep.moduleName)
|
|
106885
|
+
depSwiftPods.map((dep) => dep.moduleName),
|
|
106886
|
+
providerDefines
|
|
106809
106887
|
),
|
|
106810
106888
|
cxxInterop: true
|
|
106811
106889
|
});
|
|
@@ -109265,7 +109343,7 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
109265
109343
|
}
|
|
109266
109344
|
`;
|
|
109267
109345
|
}
|
|
109268
|
-
var import_node_crypto84, import_node_fs139, import_node_module18, import_node_path141, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_SHADOW_HANDLE_HOST, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
|
|
109346
|
+
var import_node_crypto84, import_node_fs139, import_node_module18, import_node_path141, TURBO_CORE_TARGET, TURBO_FMT_TARGET, TURBO_ENTRY_HEADER, TURBO_CORE_PUBLIC_HEADERS, REGISTRATION, CODEGEN_OBJC, UNIT, HEADER5, OBJC2, OBJC_TURBO, OBJC_BRIDGE, OBJC_REGISTERED, REACT_NATIVE_UNITS, REACT_NATIVE_INCLUDE_ROOTS, REACT_NATIVE_OBJC_UNITS, REACT_NATIVE_OBJC_VERSIONED_UNITS, REACT_NATIVE_HEADER_DIRS, REACT_NATIVE_BARE_HEADER_DIRS, DECLARED_MODULE_NAME, EXPORTED_MODULE, sha2564, podspecList, reactNativePods, reactNativePod, versionParts, iosOf, JS_CALL_INVOKER, FABRIC_SHADOW_HANDLE_HOST, FABRIC_HOST_INCLUDES, FABRIC_HOST_PAPER_INCLUDES, PAPER_UIKIT_BRIDGE_SWIFT;
|
|
109269
109347
|
var init_turbo_source = __esm({
|
|
109270
109348
|
"src/turbo-source.ts"() {
|
|
109271
109349
|
"use strict";
|
|
@@ -109401,6 +109479,21 @@ var init_turbo_source = __esm({
|
|
|
109401
109479
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
109402
109480
|
sha2564 = (data) => (0, import_node_crypto84.createHash)("sha256").update(data).digest("hex");
|
|
109403
109481
|
podspecList = podspecAttribute;
|
|
109482
|
+
reactNativePods = /* @__PURE__ */ new Set([
|
|
109483
|
+
"React",
|
|
109484
|
+
"ReactCommon",
|
|
109485
|
+
"ReactCodegen",
|
|
109486
|
+
"ReactNativeDependencies",
|
|
109487
|
+
"hermes-engine",
|
|
109488
|
+
"FBLazyVector",
|
|
109489
|
+
"DoubleConversion",
|
|
109490
|
+
"glog",
|
|
109491
|
+
"boost",
|
|
109492
|
+
"fmt",
|
|
109493
|
+
"fast_float",
|
|
109494
|
+
"Yoga"
|
|
109495
|
+
]);
|
|
109496
|
+
reactNativePod = (name3) => reactNativePods.has(name3) || name3.startsWith("React-") || name3.startsWith("RCT");
|
|
109404
109497
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
109405
109498
|
iosOf = (member) => object7(member.ios) ? member.ios : null;
|
|
109406
109499
|
JS_CALL_INVOKER = `namespace {
|
|
@@ -110855,7 +110948,7 @@ var init_react_native_core = __esm({
|
|
|
110855
110948
|
init_swift_distribution();
|
|
110856
110949
|
init_swift_package();
|
|
110857
110950
|
init_swiftContract();
|
|
110858
|
-
recipe = true ? "
|
|
110951
|
+
recipe = true ? "db2c81d6628055a561c22667b098e4686f9d8924ffb229c4c7d9e15a25182502" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
110859
110952
|
strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
110860
110953
|
building = /* @__PURE__ */ new Map();
|
|
110861
110954
|
}
|
|
@@ -111377,6 +111470,9 @@ function retarget(cached4, base2) {
|
|
|
111377
111470
|
for (const module2 of result.modules) {
|
|
111378
111471
|
module2.url = replaceBase(module2.url, cached4.base, base2);
|
|
111379
111472
|
module2.icuUrl = replaceBase(module2.icuUrl, cached4.base, base2);
|
|
111473
|
+
if (module2.sdkUrl) module2.sdkUrl = replaceBase(module2.sdkUrl, cached4.base, base2);
|
|
111474
|
+
if (module2.sdkBindingUrl)
|
|
111475
|
+
module2.sdkBindingUrl = replaceBase(module2.sdkBindingUrl, cached4.base, base2);
|
|
111380
111476
|
}
|
|
111381
111477
|
return result;
|
|
111382
111478
|
}
|
|
@@ -111443,6 +111539,8 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
111443
111539
|
return originals.some((file) => import_node_fs144.default.realpathSync(file).startsWith(reactNativeRoot)) ? [target.name] : [];
|
|
111444
111540
|
})
|
|
111445
111541
|
);
|
|
111542
|
+
for (const name3 of RENDERER_DEPENDENCY_PODS)
|
|
111543
|
+
if (targetByName.has(name3)) reactTargets.add(name3);
|
|
111446
111544
|
for (const [file, source] of Object.entries(installed2.sourcePaths)) {
|
|
111447
111545
|
if (!file.endsWith(".swift") || !import_node_fs144.default.realpathSync(source).startsWith(reactNativeRoot))
|
|
111448
111546
|
continue;
|
|
@@ -111474,9 +111572,19 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
111474
111572
|
map2(file)
|
|
111475
111573
|
])
|
|
111476
111574
|
);
|
|
111575
|
+
const publishedFrameworkTargets = /* @__PURE__ */ new Set([...provided, ...reactTargets]);
|
|
111576
|
+
const frameworkQueue = [...publishedFrameworkTargets];
|
|
111577
|
+
while (frameworkQueue.length > 0) {
|
|
111578
|
+
const name3 = frameworkQueue.pop();
|
|
111579
|
+
for (const dependency of importedTargets.get(name3) ?? []) {
|
|
111580
|
+
if (publishedFrameworkTargets.has(dependency)) continue;
|
|
111581
|
+
publishedFrameworkTargets.add(dependency);
|
|
111582
|
+
frameworkQueue.push(dependency);
|
|
111583
|
+
}
|
|
111584
|
+
}
|
|
111477
111585
|
for (const target of input.nativeTargets ?? []) {
|
|
111478
111586
|
const runtimeModule = provided.has(target.name);
|
|
111479
|
-
if (!
|
|
111587
|
+
if (!publishedFrameworkTargets.has(target.name)) continue;
|
|
111480
111588
|
const swift = runtimeModule ? swiftModuleInterface(moduleRoot, target.name) : null;
|
|
111481
111589
|
const refineClangTypes = clangTypeOwnership(moduleRoot, target.name);
|
|
111482
111590
|
const interfaceName = `${target.name}-Swift.h`;
|
|
@@ -112854,7 +112962,6 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
112854
112962
|
linkedLibraries.set(name3, library);
|
|
112855
112963
|
}
|
|
112856
112964
|
projectFor(packagePath).oneModule = false;
|
|
112857
|
-
projectFor(packagePath).standalone = true;
|
|
112858
112965
|
projectFor(packagePath).optimize = true;
|
|
112859
112966
|
projectFor(packagePath).staticClangTargets = provider?.staticClangTargets;
|
|
112860
112967
|
projectFor(packagePath).binaryModules = Object.fromEntries([
|
|
@@ -113190,8 +113297,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
113190
113297
|
return prepared;
|
|
113191
113298
|
}
|
|
113192
113299
|
}
|
|
113193
|
-
const link = async (linked2) => {
|
|
113194
|
-
const packagePath = expoSwiftPackage(key2,
|
|
113300
|
+
const link = async (linked2, name3 = "linked-app") => {
|
|
113301
|
+
const packagePath = expoSwiftPackage(key2, name3);
|
|
113195
113302
|
preparePackage2(linked2, packagePath);
|
|
113196
113303
|
signal.throwIfAborted();
|
|
113197
113304
|
const stamp = sourceContentStamp(packagePath, module2.root);
|
|
@@ -113249,35 +113356,24 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
113249
113356
|
error instanceof SwiftMissingModulesError ? [...message.matchAll(/^ (\S+)/gm)].map((match) => match[1]) : []
|
|
113250
113357
|
);
|
|
113251
113358
|
return pool.filter(
|
|
113252
|
-
(unit2) => [
|
|
113359
|
+
(unit2) => [
|
|
113360
|
+
...Object.keys(unit2.files),
|
|
113361
|
+
...expoUnitAppPaths(unit2),
|
|
113362
|
+
...(unit2.nativeTargets ?? []).flatMap(
|
|
113363
|
+
(native) => [native.bridgingHeader, native.prefixHeader].filter(
|
|
113364
|
+
(file) => file !== null
|
|
113365
|
+
)
|
|
113366
|
+
)
|
|
113367
|
+
].some(
|
|
113253
113368
|
(name3) => nativeCopies.includes(name3) || errorFiles.some((file) => file === name3 || file.endsWith(`/${name3}`))
|
|
113254
113369
|
) || Object.values(unit2.files).some(
|
|
113255
113370
|
(source) => swiftImportNames(source).some((name3) => missing2.has(name3))
|
|
113256
113371
|
)
|
|
113257
113372
|
);
|
|
113258
113373
|
};
|
|
113259
|
-
let checked = candidates;
|
|
113260
113374
|
linked = [];
|
|
113261
|
-
let
|
|
113262
|
-
|
|
113263
|
-
for (; ; ) {
|
|
113264
|
-
const named = namedBy(failure2, rest);
|
|
113265
|
-
if (named.length === 0 || named.length === rest.length) break;
|
|
113266
|
-
rest = rest.filter((unit2) => !named.includes(unit2));
|
|
113267
|
-
report(`linking ${rest.length} namespaces the diagnostic does not name`);
|
|
113268
|
-
try {
|
|
113269
|
-
artifact = await link(rest);
|
|
113270
|
-
linked = rest;
|
|
113271
|
-
checked = candidates.filter((unit2) => !rest.includes(unit2));
|
|
113272
|
-
break;
|
|
113273
|
-
} catch (error) {
|
|
113274
|
-
signal.throwIfAborted();
|
|
113275
|
-
if (error instanceof ExpoSwiftLinkRefusal) throw error;
|
|
113276
|
-
failure2 = error;
|
|
113277
|
-
}
|
|
113278
|
-
}
|
|
113279
|
-
const linkedWithoutChecks = linked.length;
|
|
113280
|
-
for (const unit2 of checked) {
|
|
113375
|
+
let isolatedArtifact;
|
|
113376
|
+
const check2 = async (unit2) => {
|
|
113281
113377
|
signal.throwIfAborted();
|
|
113282
113378
|
const packagePath = expoSwiftPackage(key2, unit2.moduleId);
|
|
113283
113379
|
preparePackage2([unit2], packagePath);
|
|
@@ -113327,9 +113423,43 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
113327
113423
|
unitErrors.length ? unitErrors.join("\n") : diagnostic
|
|
113328
113424
|
);
|
|
113329
113425
|
}
|
|
113330
|
-
}
|
|
113426
|
+
};
|
|
113427
|
+
const isolate = async (group, failure2) => {
|
|
113428
|
+
const named = namedBy(failure2, group);
|
|
113429
|
+
if (group !== candidates)
|
|
113430
|
+
report(
|
|
113431
|
+
`${group.length} namespaces failed${named.length ? `, naming ${named.map((unit2) => unit2.moduleId).join(", ")}` : ""}: ${(failure2 instanceof Error ? failure2.message : String(failure2)).match(/^.+: error: .*$/m)?.[0] ?? "no source error"}`
|
|
113432
|
+
);
|
|
113433
|
+
const half = Math.ceil(group.length / 2);
|
|
113434
|
+
const parts2 = named.length > 0 && named.length < group.length ? [
|
|
113435
|
+
...named.map((unit2) => [unit2]),
|
|
113436
|
+
group.filter((unit2) => !named.includes(unit2))
|
|
113437
|
+
] : [group.slice(0, half), group.slice(half)];
|
|
113438
|
+
for (const part of parts2) {
|
|
113439
|
+
signal.throwIfAborted();
|
|
113440
|
+
if (part.length === 0) continue;
|
|
113441
|
+
if (part.length === 1) {
|
|
113442
|
+
await check2(part[0]);
|
|
113443
|
+
continue;
|
|
113444
|
+
}
|
|
113445
|
+
const name3 = (0, import_node_crypto88.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
|
|
113446
|
+
report(`linking ${part.length} namespaces to isolate failures`);
|
|
113447
|
+
try {
|
|
113448
|
+
const built2 = await link(part, `isolate-${name3}`);
|
|
113449
|
+
linked.push(...part);
|
|
113450
|
+
isolatedArtifact = { units: part, artifact: built2 };
|
|
113451
|
+
} catch (error) {
|
|
113452
|
+
signal.throwIfAborted();
|
|
113453
|
+
if (error instanceof ExpoSwiftLinkRefusal) throw error;
|
|
113454
|
+
await isolate(part, error);
|
|
113455
|
+
}
|
|
113456
|
+
}
|
|
113457
|
+
};
|
|
113458
|
+
await isolate(candidates, linkError);
|
|
113331
113459
|
if (linked.length === candidates.length) throw linkError;
|
|
113332
|
-
if (
|
|
113460
|
+
if (isolatedArtifact?.units.length === linked.length)
|
|
113461
|
+
artifact = isolatedArtifact.artifact;
|
|
113462
|
+
else if (linked.length) {
|
|
113333
113463
|
try {
|
|
113334
113464
|
artifact = await link(linked);
|
|
113335
113465
|
} catch (error) {
|
|
@@ -113359,10 +113489,12 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
113359
113489
|
}
|
|
113360
113490
|
if (artifact) {
|
|
113361
113491
|
signal.throwIfAborted();
|
|
113492
|
+
const sdkAssets = await prepareSwiftSdkEntryAssets(base2, artifact);
|
|
113362
113493
|
await publishArtifact?.(artifact, signal);
|
|
113363
113494
|
result.modules.push({
|
|
113364
113495
|
namespaces: linked.map((unit2) => unit2.moduleId),
|
|
113365
113496
|
url: `${base2}/__peach/swift/${artifact.hash}.wasm`,
|
|
113497
|
+
...sdkAssets,
|
|
113366
113498
|
hash: artifact.hash,
|
|
113367
113499
|
icuUrl: icuUrl(base2, artifact),
|
|
113368
113500
|
rootId: `${key2}/Expo`,
|
|
@@ -113524,6 +113656,7 @@ var init_expo_swift_host = __esm({
|
|
|
113524
113656
|
init_swift_standins();
|
|
113525
113657
|
init_swift_submit();
|
|
113526
113658
|
init_swift_toolchain();
|
|
113659
|
+
init_turbo_codegen_intake();
|
|
113527
113660
|
init_turbo_source();
|
|
113528
113661
|
run12 = (0, import_node_util19.promisify)(import_node_child_process71.execFile);
|
|
113529
113662
|
scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
|
|
@@ -126978,7 +127111,7 @@ var init_nitro_superset = __esm({
|
|
|
126978
127111
|
init_nitroContract();
|
|
126979
127112
|
init_swift_standin_digest();
|
|
126980
127113
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
126981
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
127114
|
+
NITRO_COMPILER_DIGEST = true ? "744976c15724422db8f3bc8d1fdfdcf68c3f91b185210a50951930d2ea18c38e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
126982
127115
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
126983
127116
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
126984
127117
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -127056,7 +127189,10 @@ async function compileNitroApp(appRoot, origin, configure, moduleRoot, shared =
|
|
|
127056
127189
|
};
|
|
127057
127190
|
}
|
|
127058
127191
|
async function compiledModuleAssets(artifact) {
|
|
127059
|
-
const assets2 = await swiftArtifactAssets(
|
|
127192
|
+
const assets2 = await swiftArtifactAssets(
|
|
127193
|
+
artifact,
|
|
127194
|
+
await prepareSwiftSdkEntryAssets("", artifact)
|
|
127195
|
+
);
|
|
127060
127196
|
return [...assets2].map(([address, asset]) => ({ path: address.slice(1), ...asset }));
|
|
127061
127197
|
}
|
|
127062
127198
|
async function buildNitroBundle(appRoot, configuration2, moduleRoot, shared = true) {
|