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
package/dist-lib/skills.cjs
CHANGED
|
@@ -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;
|
|
@@ -30666,7 +30666,7 @@ var init_process_liveness = __esm({
|
|
|
30666
30666
|
var runtime_companion_default;
|
|
30667
30667
|
var init_runtime_companion = __esm({
|
|
30668
30668
|
"runtime-companion.json"() {
|
|
30669
|
-
runtime_companion_default = { abi: 1, sha256: "
|
|
30669
|
+
runtime_companion_default = { abi: 1, sha256: "daf162d4a4e16da33424ba3f1895db477c3561a9d74f1f77b381d8f6af391475", file: "node/cli-daf162d4a4e16da33424ba3f1895db477c3561a9d74f1f77b381d8f6af391475.cjs" };
|
|
30670
30670
|
}
|
|
30671
30671
|
});
|
|
30672
30672
|
|
|
@@ -36017,7 +36017,7 @@ var init_swift_objc_sdk_tree = __esm({
|
|
|
36017
36017
|
|
|
36018
36018
|
// src/swift-compiler-digest.ts
|
|
36019
36019
|
function swiftArchiveCompilerDigestValue() {
|
|
36020
|
-
return true ? "
|
|
36020
|
+
return true ? "7ec504e1047ea0f31b14e25b8958c42fd1e55cb9c121db3f05e4dead6ef226eb" : swiftCompilerSourceDigest(__sootsim_import_meta_dirname, "archive");
|
|
36021
36021
|
}
|
|
36022
36022
|
var import_node_crypto11, import_node_fs27, import_node_path25, SWIFT_DIGEST_SOURCES, LINKED_IMAGE_SOURCES, SWIFT_ARCHIVE_DIGEST_SOURCES;
|
|
36023
36023
|
var init_swift_compiler_digest = __esm({
|
|
@@ -36162,13 +36162,13 @@ var init_swift_standin_digest = __esm({
|
|
|
36162
36162
|
];
|
|
36163
36163
|
RUNTIME_IMPORT = /(?:^|[;\n])[ \t]*(?:import|export)\s+(?!type(?:\s|\{))([\s\S]*?)\s+from\s*['"]([^'"]+)['"]|(?:^|[;\n])[ \t]*import\s+['"]([^'"]+)['"]|import\s*\(\s*['"]([^'"]+)['"]\s*\)/g;
|
|
36164
36164
|
standinSourceDigest = (srcDir = __sootsim_import_meta_dirname) => sourceClosureDigest(srcDir, STANDIN_DIGEST_ENTRYPOINTS, STANDIN_DIGEST_EXCLUDED_FILES);
|
|
36165
|
-
STANDIN_SOURCE_DIGEST = true ? "
|
|
36165
|
+
STANDIN_SOURCE_DIGEST = true ? "cdf4a04b8b51e0280fcba42b7e2b6356a9ea69d0c483e1a08dc29a0dafbc3207" : standinSourceDigest();
|
|
36166
36166
|
}
|
|
36167
36167
|
});
|
|
36168
36168
|
|
|
36169
36169
|
// src/expo-native-compiler-digest.ts
|
|
36170
36170
|
function expoNativeCompilerDigestValue() {
|
|
36171
|
-
return true ? "
|
|
36171
|
+
return true ? "dd69e490ecc79ee83e8cba98c4532818a62e9b0e93c21113e2d6c21ec60d8eee" : expoNativeCompilerDigest(__sootsim_import_meta_dirname);
|
|
36172
36172
|
}
|
|
36173
36173
|
var import_node_crypto13;
|
|
36174
36174
|
var init_expo_native_compiler_digest = __esm({
|
|
@@ -71347,7 +71347,8 @@ function swiftBuildJobs() {
|
|
|
71347
71347
|
const cores = Math.min(admittedCores, parallelism);
|
|
71348
71348
|
if (process.platform === "darwin") return cores;
|
|
71349
71349
|
const memory = process.env.TM_EXEC_ADMITTED === "1" && process.env.LINUX_BUILD_SCOPE ? Number(process.env.TM_EXEC_LINUX_MEMORY_MAX) : NaN;
|
|
71350
|
-
const
|
|
71350
|
+
const effectiveMemory = Number.isSafeInteger(memory) && memory > 0 ? memory : import_node_os12.default.totalmem();
|
|
71351
|
+
const memoryJobs = Math.max(1, Math.floor(effectiveMemory / (2 * 1024 ** 3)));
|
|
71351
71352
|
return Math.min(cores, memoryJobs);
|
|
71352
71353
|
}
|
|
71353
71354
|
function swiftDistributionAt(root) {
|
|
@@ -78822,7 +78823,7 @@ async function runCompiler(command, args, options2, stream = false, quiet) {
|
|
|
78822
78823
|
}
|
|
78823
78824
|
}
|
|
78824
78825
|
function swiftCompilerJobs() {
|
|
78825
|
-
return Math.min(
|
|
78826
|
+
return Math.min(64, swiftBuildJobs(), Math.max(1, Math.floor(import_node_os18.default.totalmem() / 2 ** 31)));
|
|
78826
78827
|
}
|
|
78827
78828
|
function swiftCompilerBaseEnv(toolchainBin, sourceEnv, includePeachHome = false) {
|
|
78828
78829
|
const env = {};
|
|
@@ -84456,7 +84457,7 @@ ${wasmThreadLinkFlags.map((flag) => ` "-Xlinker", ${JSON.stringify(flag
|
|
|
84456
84457
|
REACTOR_FLAG = '"-Xclang-linker", "-mexec-model=reactor",\n';
|
|
84457
84458
|
MULTI_MANIFEST_VERSION = 76;
|
|
84458
84459
|
SWIFT_HEADER_PRODUCTS_TARGET = "PeachHeaderProducts";
|
|
84459
|
-
compilerSourceDigest = true ? "
|
|
84460
|
+
compilerSourceDigest = true ? "229f789297c5cb8e33a042e23ad3c1df20450a712a02dd0b50d2e78bc8ed3de6" : swiftCompilerSourceDigest2(__sootsim_import_meta_dirname);
|
|
84460
84461
|
nativeCxxCompilerFlags = ["-fno-cxx-modules"];
|
|
84461
84462
|
MODULE_MAP_RESPONSE_FILE_RUN = 16;
|
|
84462
84463
|
cFlagArray = (flags) => JSON.stringify(withoutGlogModuleMap(flags));
|
|
@@ -97860,7 +97861,7 @@ var init_provenance = __esm({
|
|
|
97860
97861
|
import_node_crypto57 = require("node:crypto");
|
|
97861
97862
|
import_node_fs98 = require("node:fs");
|
|
97862
97863
|
import_node_path99 = require("node:path");
|
|
97863
|
-
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":"
|
|
97864
|
+
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, ".."));
|
|
97864
97865
|
}
|
|
97865
97866
|
});
|
|
97866
97867
|
|
|
@@ -98990,6 +98991,92 @@ var init_xcode_assets = __esm({
|
|
|
98990
98991
|
}
|
|
98991
98992
|
});
|
|
98992
98993
|
|
|
98994
|
+
// src/swift-xcframework.ts
|
|
98995
|
+
function simulatorNativeLibrary(dir) {
|
|
98996
|
+
if (dir.endsWith(".framework")) {
|
|
98997
|
+
const name3 = import_node_path102.default.basename(dir, ".framework");
|
|
98998
|
+
return {
|
|
98999
|
+
name: name3,
|
|
99000
|
+
file: import_node_path102.default.join(dir, name3),
|
|
99001
|
+
slice: import_node_path102.default.dirname(dir),
|
|
99002
|
+
kind: "framework"
|
|
99003
|
+
};
|
|
99004
|
+
}
|
|
99005
|
+
if (!dir.endsWith(".xcframework")) return null;
|
|
99006
|
+
const info = parsePlistBytes(import_node_fs101.default.readFileSync(import_node_path102.default.join(dir, "Info.plist")));
|
|
99007
|
+
if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
|
|
99008
|
+
throw new Error(`${dir}: invalid XCFramework library declarations`);
|
|
99009
|
+
const matches = [];
|
|
99010
|
+
for (const entry of info.AvailableLibraries) {
|
|
99011
|
+
if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
|
|
99012
|
+
if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
|
|
99013
|
+
continue;
|
|
99014
|
+
if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
|
|
99015
|
+
throw new Error(`${dir}: invalid simulator library paths`);
|
|
99016
|
+
const archive = /\.a$/.test(entry.LibraryPath);
|
|
99017
|
+
const framework = /\.framework$/.test(entry.LibraryPath);
|
|
99018
|
+
if (!archive && !framework) continue;
|
|
99019
|
+
const slice = import_node_path102.default.resolve(dir, entry.LibraryIdentifier);
|
|
99020
|
+
const bundle = import_node_path102.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
|
|
99021
|
+
const bundleRelative = import_node_path102.default.relative(dir, bundle);
|
|
99022
|
+
if (bundleRelative.startsWith("..") || import_node_path102.default.isAbsolute(bundleRelative))
|
|
99023
|
+
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
99024
|
+
let name3 = entry.LibraryPath;
|
|
99025
|
+
let file = bundle;
|
|
99026
|
+
if (framework) {
|
|
99027
|
+
name3 = import_node_path102.default.basename(bundle, ".framework");
|
|
99028
|
+
file = import_node_path102.default.join(bundle, name3);
|
|
99029
|
+
}
|
|
99030
|
+
const relative7 = import_node_path102.default.relative(dir, file);
|
|
99031
|
+
if (relative7.startsWith("..") || import_node_path102.default.isAbsolute(relative7))
|
|
99032
|
+
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
99033
|
+
if (framework) {
|
|
99034
|
+
matches.push({ name: name3, file, slice, kind: "framework" });
|
|
99035
|
+
continue;
|
|
99036
|
+
}
|
|
99037
|
+
const headers = typeof entry.HeadersPath === "string" ? import_node_path102.default.resolve(slice, entry.HeadersPath) : void 0;
|
|
99038
|
+
if (headers && relativeInside(slice, headers) === null)
|
|
99039
|
+
throw new Error(`${dir}: headers escape their XCFramework slice`);
|
|
99040
|
+
matches.push({ name: name3, file, slice, kind: "archive", headers });
|
|
99041
|
+
}
|
|
99042
|
+
if (matches.length === 0) return null;
|
|
99043
|
+
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
99044
|
+
return matches[0];
|
|
99045
|
+
}
|
|
99046
|
+
function isDynamicLibrary2(file) {
|
|
99047
|
+
const fd = import_node_fs101.default.openSync(file, "r");
|
|
99048
|
+
try {
|
|
99049
|
+
const read2 = (offset) => {
|
|
99050
|
+
const bytes = Buffer.alloc(16);
|
|
99051
|
+
import_node_fs101.default.readSync(fd, bytes, 0, 16, offset);
|
|
99052
|
+
return bytes;
|
|
99053
|
+
};
|
|
99054
|
+
let header = read2(0);
|
|
99055
|
+
const universal = header.readUInt32BE(0);
|
|
99056
|
+
if (universal === 3405691582 || universal === 3405691583) {
|
|
99057
|
+
const arch = read2(8);
|
|
99058
|
+
header = read2(
|
|
99059
|
+
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
99060
|
+
);
|
|
99061
|
+
}
|
|
99062
|
+
const magic = header.readUInt32LE(0);
|
|
99063
|
+
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
99064
|
+
} finally {
|
|
99065
|
+
import_node_fs101.default.closeSync(fd);
|
|
99066
|
+
}
|
|
99067
|
+
}
|
|
99068
|
+
var import_node_fs101, import_node_path102;
|
|
99069
|
+
var init_swift_xcframework = __esm({
|
|
99070
|
+
"src/swift-xcframework.ts"() {
|
|
99071
|
+
"use strict";
|
|
99072
|
+
import_node_fs101 = __toESM(require("node:fs"), 1);
|
|
99073
|
+
import_node_path102 = __toESM(require("node:path"), 1);
|
|
99074
|
+
init_is_record();
|
|
99075
|
+
init_plist_bytes();
|
|
99076
|
+
init_swift_source_file();
|
|
99077
|
+
}
|
|
99078
|
+
});
|
|
99079
|
+
|
|
98993
99080
|
// src/intent-definition/system-types.ts
|
|
98994
99081
|
function systemIntentType(kind, name3) {
|
|
98995
99082
|
const hashes = kind === "Enum" ? systemEnumHashes : systemObjectHashes;
|
|
@@ -100597,17 +100684,17 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
100597
100684
|
throw new Error(`${definition2}: invalid intent code generation language ${language}`);
|
|
100598
100685
|
if (prefix) identifier(prefix);
|
|
100599
100686
|
if (module2) identifier(module2);
|
|
100600
|
-
const source =
|
|
100687
|
+
const source = import_node_fs102.default.readFileSync(definition2);
|
|
100601
100688
|
const key2 = (0, import_node_crypto60.createHash)("sha256").update(
|
|
100602
100689
|
JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
|
|
100603
100690
|
).update("\0").update(source).digest("hex");
|
|
100604
|
-
const cache =
|
|
100605
|
-
const output =
|
|
100606
|
-
const localization = definition2.split(
|
|
100607
|
-
const compiledRelative =
|
|
100608
|
-
const compiled =
|
|
100609
|
-
const generated =
|
|
100610
|
-
if (
|
|
100691
|
+
const cache = import_node_path103.default.join(derivedDirectory, "IntentDefinitions");
|
|
100692
|
+
const output = import_node_path103.default.join(cache, key2);
|
|
100693
|
+
const localization = definition2.split(import_node_path103.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
100694
|
+
const compiledRelative = import_node_path103.default.join("Resources", localization, import_node_path103.default.basename(definition2));
|
|
100695
|
+
const compiled = import_node_path103.default.join(output, compiledRelative);
|
|
100696
|
+
const generated = import_node_path103.default.join(output, "Sources");
|
|
100697
|
+
if (import_node_fs102.default.existsSync(compiled) && import_node_fs102.default.existsSync(generated)) return { compiled, generated };
|
|
100611
100698
|
let metadata;
|
|
100612
100699
|
let sources;
|
|
100613
100700
|
try {
|
|
@@ -100617,34 +100704,34 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
100617
100704
|
} catch (cause) {
|
|
100618
100705
|
throw new Error(`could not compile intent definition ${definition2}`, { cause });
|
|
100619
100706
|
}
|
|
100620
|
-
|
|
100621
|
-
const stage =
|
|
100707
|
+
import_node_fs102.default.mkdirSync(cache, { recursive: true });
|
|
100708
|
+
const stage = import_node_fs102.default.mkdtempSync(import_node_path103.default.join(cache, ".compile-"));
|
|
100622
100709
|
try {
|
|
100623
|
-
const sourceDirectory =
|
|
100624
|
-
const resource =
|
|
100625
|
-
|
|
100626
|
-
|
|
100627
|
-
|
|
100710
|
+
const sourceDirectory = import_node_path103.default.join(stage, "Sources");
|
|
100711
|
+
const resource = import_node_path103.default.join(stage, compiledRelative);
|
|
100712
|
+
import_node_fs102.default.mkdirSync(sourceDirectory);
|
|
100713
|
+
import_node_fs102.default.mkdirSync(import_node_path103.default.dirname(resource), { recursive: true });
|
|
100714
|
+
import_node_fs102.default.writeFileSync(resource, metadata);
|
|
100628
100715
|
for (const [file, contents2] of sources)
|
|
100629
|
-
|
|
100716
|
+
import_node_fs102.default.writeFileSync(import_node_path103.default.join(sourceDirectory, file), contents2);
|
|
100630
100717
|
try {
|
|
100631
|
-
|
|
100718
|
+
import_node_fs102.default.renameSync(stage, output);
|
|
100632
100719
|
} catch (error) {
|
|
100633
|
-
if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !
|
|
100720
|
+
if (!isRecord(error) || error.code !== "EEXIST" && error.code !== "ENOTEMPTY" || !import_node_fs102.default.existsSync(compiled) || !import_node_fs102.default.existsSync(generated))
|
|
100634
100721
|
throw error;
|
|
100635
100722
|
}
|
|
100636
100723
|
return { compiled, generated };
|
|
100637
100724
|
} finally {
|
|
100638
|
-
|
|
100725
|
+
import_node_fs102.default.rmSync(stage, { recursive: true, force: true });
|
|
100639
100726
|
}
|
|
100640
100727
|
}
|
|
100641
|
-
var import_node_crypto60,
|
|
100728
|
+
var import_node_crypto60, import_node_fs102, import_node_path103, intentCompilerRevision;
|
|
100642
100729
|
var init_xcode_intents = __esm({
|
|
100643
100730
|
"src/xcode-intents.ts"() {
|
|
100644
100731
|
"use strict";
|
|
100645
100732
|
import_node_crypto60 = require("node:crypto");
|
|
100646
|
-
|
|
100647
|
-
|
|
100733
|
+
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
100734
|
+
import_node_path103 = __toESM(require("node:path"), 1);
|
|
100648
100735
|
init_fields();
|
|
100649
100736
|
init_metadata();
|
|
100650
100737
|
init_plist_reader();
|
|
@@ -100700,7 +100787,7 @@ function remoteVersionRequirement(entry) {
|
|
|
100700
100787
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
100701
100788
|
const json = Bun.JSON5.parse(source);
|
|
100702
100789
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
100703
|
-
const projectDir =
|
|
100790
|
+
const projectDir = import_node_path104.default.dirname(xcodeproj);
|
|
100704
100791
|
const objects = {};
|
|
100705
100792
|
let next = 0;
|
|
100706
100793
|
const add2 = (entry, id) => {
|
|
@@ -100713,7 +100800,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100713
100800
|
const base2 = /^<([A-Z]+)>\/(.*)$/.exec(raw2);
|
|
100714
100801
|
if (base2) {
|
|
100715
100802
|
if (base2[1] === "PROJECT")
|
|
100716
|
-
return { sourceTree: "<absolute>", path:
|
|
100803
|
+
return { sourceTree: "<absolute>", path: import_node_path104.default.join(projectDir, base2[2]) };
|
|
100717
100804
|
if (base2[1] === "PRODUCTS")
|
|
100718
100805
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base2[2] };
|
|
100719
100806
|
return null;
|
|
@@ -100721,7 +100808,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100721
100808
|
const unescaped = raw2.replaceAll("\\<", "<");
|
|
100722
100809
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
100723
100810
|
if (unescaped.startsWith("~")) return null;
|
|
100724
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
100811
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path104.default.join(groupDir, unescaped) };
|
|
100725
100812
|
};
|
|
100726
100813
|
const memberships = [];
|
|
100727
100814
|
const folders = [];
|
|
@@ -100732,7 +100819,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100732
100819
|
const kind = text6(entry.kind) ?? "file-reference";
|
|
100733
100820
|
const raw2 = text6(entry.path) ?? "";
|
|
100734
100821
|
const located = raw2 === "" ? null : locate(raw2, parent.dir);
|
|
100735
|
-
const name3 = text6(entry.name) ??
|
|
100822
|
+
const name3 = text6(entry.name) ?? import_node_path104.default.basename(raw2);
|
|
100736
100823
|
const node = { id: "", name: name3, dir: null, parent, children: [] };
|
|
100737
100824
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
100738
100825
|
node.dir = raw2 === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -100853,7 +100940,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100853
100940
|
if (!isObject(entry)) continue;
|
|
100854
100941
|
const repository = text6(entry.repository);
|
|
100855
100942
|
const local = text6(entry.path);
|
|
100856
|
-
const name3 = local !== void 0 ?
|
|
100943
|
+
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$/, "");
|
|
100857
100944
|
const id = text6(entry.kind) === "local" && local !== void 0 ? add2({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add2({
|
|
100858
100945
|
isa: "XCRemoteSwiftPackageReference",
|
|
100859
100946
|
repositoryURL: repository ?? "",
|
|
@@ -101025,11 +101112,11 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
101025
101112
|
function isJsonObject(value) {
|
|
101026
101113
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
101027
101114
|
}
|
|
101028
|
-
var
|
|
101115
|
+
var import_node_path104, isObject, text6, items, PHASE_ISA;
|
|
101029
101116
|
var init_xcode_json_project = __esm({
|
|
101030
101117
|
"src/xcode-json-project.ts"() {
|
|
101031
101118
|
"use strict";
|
|
101032
|
-
|
|
101119
|
+
import_node_path104 = __toESM(require("node:path"), 1);
|
|
101033
101120
|
isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
101034
101121
|
text6 = (value) => typeof value === "string" ? value : void 0;
|
|
101035
101122
|
items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -101111,27 +101198,27 @@ var init_xcode_swift_features = __esm({
|
|
|
101111
101198
|
|
|
101112
101199
|
// src/xcode-project.ts
|
|
101113
101200
|
function walkFiles(dir) {
|
|
101114
|
-
if (!
|
|
101201
|
+
if (!import_node_fs103.default.existsSync(dir)) return [];
|
|
101115
101202
|
const out = [];
|
|
101116
|
-
for (const entry of
|
|
101203
|
+
for (const entry of import_node_fs103.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
|
|
101117
101204
|
if (entry.name.startsWith(".")) continue;
|
|
101118
|
-
const full =
|
|
101205
|
+
const full = import_node_path105.default.join(dir, entry.name);
|
|
101119
101206
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
101120
101207
|
else if (entry.isFile()) out.push(full);
|
|
101121
101208
|
}
|
|
101122
101209
|
return out;
|
|
101123
101210
|
}
|
|
101124
101211
|
function readXcconfig(file, read2) {
|
|
101125
|
-
if (read2.includes(file) || !
|
|
101212
|
+
if (read2.includes(file) || !import_node_fs103.default.existsSync(file)) return {};
|
|
101126
101213
|
read2.push(file);
|
|
101127
101214
|
const settings = {};
|
|
101128
|
-
for (const raw2 of
|
|
101215
|
+
for (const raw2 of import_node_fs103.default.readFileSync(file, "utf8").split("\n")) {
|
|
101129
101216
|
const line = raw2.replace(/\/\/.*$/, "").trim();
|
|
101130
101217
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
101131
101218
|
if (include) {
|
|
101132
101219
|
Object.assign(
|
|
101133
101220
|
settings,
|
|
101134
|
-
readXcconfig(
|
|
101221
|
+
readXcconfig(import_node_path105.default.resolve(import_node_path105.default.dirname(file), include[1]), read2)
|
|
101135
101222
|
);
|
|
101136
101223
|
continue;
|
|
101137
101224
|
}
|
|
@@ -101176,8 +101263,8 @@ function applyOperator(value, operator) {
|
|
|
101176
101263
|
return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
101177
101264
|
case "standardizepath":
|
|
101178
101265
|
if (value === ".") return value;
|
|
101179
|
-
if (
|
|
101180
|
-
return
|
|
101266
|
+
if (import_node_path105.default.posix.isAbsolute(value))
|
|
101267
|
+
return import_node_path105.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
|
|
101181
101268
|
return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
|
|
101182
101269
|
}
|
|
101183
101270
|
throw new Error(`unsupported build setting operator :${operator}`);
|
|
@@ -101186,22 +101273,22 @@ function decodeXml(text7) {
|
|
|
101186
101273
|
return text7.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
101187
101274
|
}
|
|
101188
101275
|
function workspaceReferences(workspace) {
|
|
101189
|
-
const data =
|
|
101190
|
-
if (!
|
|
101276
|
+
const data = import_node_path105.default.join(workspace, "contents.xcworkspacedata");
|
|
101277
|
+
if (!import_node_fs103.default.existsSync(data))
|
|
101191
101278
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
101192
|
-
const container =
|
|
101279
|
+
const container = import_node_path105.default.dirname(workspace);
|
|
101193
101280
|
const locate = (location, base2) => {
|
|
101194
101281
|
const colon = location.indexOf(":");
|
|
101195
101282
|
const kind = location.slice(0, colon);
|
|
101196
101283
|
const rest = location.slice(colon + 1);
|
|
101197
|
-
if (kind === "group") return
|
|
101198
|
-
if (kind === "container" || kind === "self") return
|
|
101199
|
-
if (kind === "absolute") return
|
|
101200
|
-
throw new Error(`${
|
|
101284
|
+
if (kind === "group") return import_node_path105.default.resolve(base2, rest);
|
|
101285
|
+
if (kind === "container" || kind === "self") return import_node_path105.default.resolve(container, rest);
|
|
101286
|
+
if (kind === "absolute") return import_node_path105.default.resolve(rest);
|
|
101287
|
+
throw new Error(`${import_node_path105.default.basename(workspace)} has an unsupported location ${location}`);
|
|
101201
101288
|
};
|
|
101202
101289
|
const groups = [container];
|
|
101203
101290
|
const references = [];
|
|
101204
|
-
for (const [, closing, tag, attributes, selfClosing] of
|
|
101291
|
+
for (const [, closing, tag, attributes, selfClosing] of import_node_fs103.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
|
|
101205
101292
|
if (closing) {
|
|
101206
101293
|
if (tag === "Group") groups.pop();
|
|
101207
101294
|
continue;
|
|
@@ -101215,29 +101302,29 @@ function workspaceReferences(workspace) {
|
|
|
101215
101302
|
return references;
|
|
101216
101303
|
}
|
|
101217
101304
|
function enclosingXcodeWorkspace(xcodeproj) {
|
|
101218
|
-
const project2 =
|
|
101219
|
-
for (let dir =
|
|
101220
|
-
for (const name3 of
|
|
101305
|
+
const project2 = import_node_fs103.default.realpathSync.native(xcodeproj);
|
|
101306
|
+
for (let dir = import_node_path105.default.dirname(project2); ; dir = import_node_path105.default.dirname(dir)) {
|
|
101307
|
+
for (const name3 of import_node_fs103.default.readdirSync(dir).sort()) {
|
|
101221
101308
|
if (!name3.endsWith(".xcworkspace")) continue;
|
|
101222
|
-
const workspace =
|
|
101223
|
-
if (!
|
|
101309
|
+
const workspace = import_node_path105.default.join(dir, name3);
|
|
101310
|
+
if (!import_node_fs103.default.existsSync(import_node_path105.default.join(workspace, "contents.xcworkspacedata"))) continue;
|
|
101224
101311
|
if (workspaceReferences(workspace).some(
|
|
101225
|
-
(reference) =>
|
|
101312
|
+
(reference) => import_node_fs103.default.existsSync(reference) && import_node_fs103.default.realpathSync.native(reference) === project2
|
|
101226
101313
|
))
|
|
101227
101314
|
return workspace;
|
|
101228
101315
|
}
|
|
101229
|
-
if (
|
|
101316
|
+
if (import_node_fs103.default.existsSync(import_node_path105.default.join(dir, ".git")) || import_node_path105.default.dirname(dir) === dir) return null;
|
|
101230
101317
|
}
|
|
101231
101318
|
}
|
|
101232
101319
|
function findXcodeProject(input) {
|
|
101233
|
-
const resolved =
|
|
101320
|
+
const resolved = import_node_path105.default.resolve(input);
|
|
101234
101321
|
if (resolved.endsWith(".xcworkspace")) {
|
|
101235
|
-
return
|
|
101322
|
+
return import_node_path105.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path105.default.dirname(resolved) : resolved;
|
|
101236
101323
|
}
|
|
101237
101324
|
if (resolved.endsWith(".xcodeproj")) return resolved;
|
|
101238
101325
|
if (!isDirectory3(resolved)) return null;
|
|
101239
101326
|
for (const extension of [".xcworkspace", ".xcodeproj"]) {
|
|
101240
|
-
const found2 =
|
|
101327
|
+
const found2 = import_node_fs103.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
|
|
101241
101328
|
if (found2.length > 1) {
|
|
101242
101329
|
if (extension === ".xcworkspace") {
|
|
101243
101330
|
const selected = selectXcodeWorkspace(resolved, found2);
|
|
@@ -101247,14 +101334,14 @@ function findXcodeProject(input) {
|
|
|
101247
101334
|
`${resolved} holds ${found2.length} ${extension} bundles (${found2.join(", ")}); pass one`
|
|
101248
101335
|
);
|
|
101249
101336
|
}
|
|
101250
|
-
if (found2.length === 1) return
|
|
101337
|
+
if (found2.length === 1) return import_node_path105.default.join(resolved, found2[0]);
|
|
101251
101338
|
}
|
|
101252
101339
|
return null;
|
|
101253
101340
|
}
|
|
101254
101341
|
function sameXcodeProject(reference, xcodeproj) {
|
|
101255
|
-
if (
|
|
101342
|
+
if (import_node_path105.default.normalize(reference) === import_node_path105.default.normalize(xcodeproj)) return true;
|
|
101256
101343
|
try {
|
|
101257
|
-
return
|
|
101344
|
+
return import_node_fs103.default.existsSync(reference) && import_node_fs103.default.existsSync(xcodeproj) && import_node_fs103.default.realpathSync.native(reference) === import_node_fs103.default.realpathSync.native(xcodeproj);
|
|
101258
101345
|
} catch {
|
|
101259
101346
|
return false;
|
|
101260
101347
|
}
|
|
@@ -101262,38 +101349,38 @@ function sameXcodeProject(reference, xcodeproj) {
|
|
|
101262
101349
|
function selectXcodeWorkspace(directory2, workspaces) {
|
|
101263
101350
|
const sorted3 = [...workspaces].sort();
|
|
101264
101351
|
if (sorted3.length === 0) return null;
|
|
101265
|
-
if (sorted3.length === 1) return
|
|
101266
|
-
const xcodeprojs =
|
|
101352
|
+
if (sorted3.length === 1) return import_node_path105.default.join(directory2, sorted3[0]);
|
|
101353
|
+
const xcodeprojs = import_node_fs103.default.readdirSync(directory2).filter((name3) => name3.endsWith(".xcodeproj")).sort();
|
|
101267
101354
|
if (xcodeprojs.length !== 1) return null;
|
|
101268
|
-
const app =
|
|
101355
|
+
const app = import_node_path105.default.join(directory2, xcodeprojs[0]);
|
|
101269
101356
|
const referencing = sorted3.filter((workspace) => {
|
|
101270
101357
|
try {
|
|
101271
|
-
return workspaceReferences(
|
|
101358
|
+
return workspaceReferences(import_node_path105.default.join(directory2, workspace)).some(
|
|
101272
101359
|
(reference) => sameXcodeProject(reference, app)
|
|
101273
101360
|
);
|
|
101274
101361
|
} catch {
|
|
101275
101362
|
return false;
|
|
101276
101363
|
}
|
|
101277
101364
|
});
|
|
101278
|
-
if (referencing.length === 1) return
|
|
101365
|
+
if (referencing.length === 1) return import_node_path105.default.join(directory2, referencing[0]);
|
|
101279
101366
|
if (referencing.length === 0) return null;
|
|
101280
|
-
const own2 = `${
|
|
101367
|
+
const own2 = `${import_node_path105.default.basename(app, ".xcodeproj")}.xcworkspace`;
|
|
101281
101368
|
const named = referencing.filter((workspace) => workspace === own2);
|
|
101282
|
-
return named.length === 1 ?
|
|
101369
|
+
return named.length === 1 ? import_node_path105.default.join(directory2, named[0]) : null;
|
|
101283
101370
|
}
|
|
101284
101371
|
function installedXcodeWorkspace(projectRoot) {
|
|
101285
|
-
const ios =
|
|
101286
|
-
if (!
|
|
101372
|
+
const ios = import_node_path105.default.join(projectRoot, "ios");
|
|
101373
|
+
if (!import_node_fs103.default.existsSync(ios)) return null;
|
|
101287
101374
|
return selectXcodeWorkspace(
|
|
101288
101375
|
ios,
|
|
101289
|
-
|
|
101376
|
+
import_node_fs103.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
|
|
101290
101377
|
);
|
|
101291
101378
|
}
|
|
101292
101379
|
function requireInstalledXcodeWorkspace(projectRoot, needed) {
|
|
101293
101380
|
const workspace = installedXcodeWorkspace(projectRoot);
|
|
101294
101381
|
if (!workspace)
|
|
101295
101382
|
throw new Error(
|
|
101296
|
-
`${needed} needs an installed pod workspace in ${
|
|
101383
|
+
`${needed} needs an installed pod workspace in ${import_node_path105.default.join(projectRoot, "ios")}`
|
|
101297
101384
|
);
|
|
101298
101385
|
return workspace;
|
|
101299
101386
|
}
|
|
@@ -101334,8 +101421,8 @@ function remotePackageRequirements(projects2) {
|
|
|
101334
101421
|
}
|
|
101335
101422
|
function xcodeProjectFile(xcodeproj) {
|
|
101336
101423
|
for (const name3 of ["project.pbxproj", "project.xcproj"]) {
|
|
101337
|
-
const file =
|
|
101338
|
-
if (
|
|
101424
|
+
const file = import_node_path105.default.join(xcodeproj, name3);
|
|
101425
|
+
if (import_node_fs103.default.existsSync(file)) return file;
|
|
101339
101426
|
}
|
|
101340
101427
|
return null;
|
|
101341
101428
|
}
|
|
@@ -101343,7 +101430,7 @@ function loadProject(xcodeproj) {
|
|
|
101343
101430
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
101344
101431
|
if (!projectFile)
|
|
101345
101432
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
101346
|
-
const source =
|
|
101433
|
+
const source = import_node_fs103.default.readFileSync(projectFile, "utf8");
|
|
101347
101434
|
const digest3 = (0, import_node_crypto61.createHash)("sha256").update(source).digest("hex");
|
|
101348
101435
|
const cached5 = loaded3.get(projectFile);
|
|
101349
101436
|
if (cached5?.digest === digest3) return cached5.project;
|
|
@@ -101360,10 +101447,10 @@ function loadProject(xcodeproj) {
|
|
|
101360
101447
|
if (!project2 || project2.isa !== "PBXProject") {
|
|
101361
101448
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
101362
101449
|
}
|
|
101363
|
-
const projectDir =
|
|
101364
|
-
|
|
101450
|
+
const projectDir = import_node_fs103.default.realpathSync.native(
|
|
101451
|
+
import_node_path105.default.resolve(import_node_path105.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
|
|
101365
101452
|
);
|
|
101366
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
101453
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path105.default.join);
|
|
101367
101454
|
const result = {
|
|
101368
101455
|
xcodeproj,
|
|
101369
101456
|
projectFile,
|
|
@@ -101394,9 +101481,9 @@ function xcodeInstallationIdentity() {
|
|
|
101394
101481
|
if (process.platform !== "darwin") return null;
|
|
101395
101482
|
const selected = process.env.DEVELOPER_DIR || selectedDeveloperDir(true);
|
|
101396
101483
|
if (!selected) return null;
|
|
101397
|
-
const directory2 =
|
|
101484
|
+
const directory2 = import_node_path105.default.extname(selected) === ".app" ? import_node_path105.default.join(selected, "Contents", "Developer") : selected;
|
|
101398
101485
|
const versionFile = `${directory2}/../version.plist`;
|
|
101399
|
-
const version2 =
|
|
101486
|
+
const version2 = import_node_fs103.default.existsSync(versionFile) ? (0, import_node_crypto61.createHash)("sha256").update(import_node_fs103.default.readFileSync(versionFile)).digest("hex") : null;
|
|
101400
101487
|
return { directory: directory2, version: version2 };
|
|
101401
101488
|
}
|
|
101402
101489
|
function defaultConfiguration(project2) {
|
|
@@ -101416,7 +101503,7 @@ function expandValue(value, settings) {
|
|
|
101416
101503
|
return value;
|
|
101417
101504
|
}
|
|
101418
101505
|
function processedInfoPlist(name3, file, settings, settingKeys) {
|
|
101419
|
-
const source = file ? parsePlist(
|
|
101506
|
+
const source = file ? parsePlist(import_node_fs103.default.readFileSync(file, "utf8")) : {};
|
|
101420
101507
|
if (!source || typeof source !== "object" || Array.isArray(source) || source instanceof Date || Buffer.isBuffer(source))
|
|
101421
101508
|
throw new Error(`${name3} Info.plist must contain a dictionary`);
|
|
101422
101509
|
const info = {};
|
|
@@ -101456,8 +101543,8 @@ function targetSettings(ref, configuration2, builtins, options2 = {}, overrides
|
|
|
101456
101543
|
const relative7 = str2(config.baseConfigurationReferenceRelativePath);
|
|
101457
101544
|
const own2 = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
101458
101545
|
const directory2 = anchor ? project2.resolvePath(anchor) : null;
|
|
101459
|
-
const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative7 ?
|
|
101460
|
-
if ((options2.requireSources !== false || options2.installedPods) && (base2 || anchor || relative7) && (!baseFile || !
|
|
101546
|
+
const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative7 ? import_node_path105.default.resolve(directory2, relative7) : null;
|
|
101547
|
+
if ((options2.requireSources !== false || options2.installedPods) && (base2 || anchor || relative7) && (!baseFile || !import_node_fs103.default.existsSync(baseFile)))
|
|
101461
101548
|
throw new Error(
|
|
101462
101549
|
`Unable to open base configuration reference file '${baseFile ?? base2 ?? relative7 ?? anchor}'`
|
|
101463
101550
|
);
|
|
@@ -101551,10 +101638,10 @@ function hostMacroPluginFlags(flags) {
|
|
|
101551
101638
|
if (flags[index - 1] !== "-load-plugin-executable") return flag;
|
|
101552
101639
|
const separator = flag.lastIndexOf("#");
|
|
101553
101640
|
if (separator < 0) return flag;
|
|
101554
|
-
const root =
|
|
101555
|
-
const manifest =
|
|
101556
|
-
if (!
|
|
101557
|
-
const pkg = JSON.parse(
|
|
101641
|
+
const root = import_node_path105.default.dirname(import_node_path105.default.dirname(flag.slice(0, separator)));
|
|
101642
|
+
const manifest = import_node_path105.default.join(root, "package.json");
|
|
101643
|
+
if (!import_node_fs103.default.existsSync(manifest)) return flag;
|
|
101644
|
+
const pkg = JSON.parse(import_node_fs103.default.readFileSync(manifest, "utf8"));
|
|
101558
101645
|
if (!isRecord(pkg) || pkg.name !== "expo-modules-macros") return flag;
|
|
101559
101646
|
const macros = (0, import_node_module9.createRequire)(manifest)(root);
|
|
101560
101647
|
if (!isRecord(macros) || typeof macros.getScannerBinaryPath !== "function")
|
|
@@ -101572,26 +101659,26 @@ function scriptCommand(shell, script) {
|
|
|
101572
101659
|
return [executable, ...args, "-c", script];
|
|
101573
101660
|
}
|
|
101574
101661
|
function expandSearchPath(directory2, rules2) {
|
|
101575
|
-
if (
|
|
101662
|
+
if (import_node_path105.default.basename(directory2) !== "**") return [directory2];
|
|
101576
101663
|
const expanded = [];
|
|
101577
101664
|
const seen = /* @__PURE__ */ new Set();
|
|
101578
|
-
const queue2 = [
|
|
101665
|
+
const queue2 = [import_node_path105.default.dirname(directory2)];
|
|
101579
101666
|
for (let at = 0; at < queue2.length; at++) {
|
|
101580
101667
|
const current2 = queue2[at];
|
|
101581
101668
|
let real;
|
|
101582
101669
|
try {
|
|
101583
|
-
real =
|
|
101670
|
+
real = import_node_fs103.default.realpathSync.native(current2);
|
|
101584
101671
|
} catch {
|
|
101585
101672
|
continue;
|
|
101586
101673
|
}
|
|
101587
|
-
if (!
|
|
101674
|
+
if (!import_node_fs103.default.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
101588
101675
|
seen.add(real);
|
|
101589
101676
|
expanded.push(current2);
|
|
101590
|
-
for (const entry of
|
|
101677
|
+
for (const entry of import_node_fs103.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
|
|
101591
101678
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
101592
101679
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
101593
101680
|
continue;
|
|
101594
|
-
queue2.push(
|
|
101681
|
+
queue2.push(import_node_path105.default.join(current2, entry.name));
|
|
101595
101682
|
}
|
|
101596
101683
|
}
|
|
101597
101684
|
return expanded;
|
|
@@ -101602,7 +101689,7 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
101602
101689
|
const rules2 = recursiveSearchRules(settings);
|
|
101603
101690
|
const directories = new Set(
|
|
101604
101691
|
settingList(settings("LIBRARY_SEARCH_PATHS")).flatMap(
|
|
101605
|
-
(raw2) => expandSearchPath(
|
|
101692
|
+
(raw2) => expandSearchPath(import_node_path105.default.resolve(projectDir, expand(raw2, settings)), rules2)
|
|
101606
101693
|
)
|
|
101607
101694
|
);
|
|
101608
101695
|
const resolved = [];
|
|
@@ -101615,18 +101702,18 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
101615
101702
|
}
|
|
101616
101703
|
let archive;
|
|
101617
101704
|
for (const directory2 of directories) {
|
|
101618
|
-
const file = (extension) =>
|
|
101705
|
+
const file = (extension) => import_node_path105.default.join(directory2, `lib${name3}.${extension}`);
|
|
101619
101706
|
const dylib = file("dylib");
|
|
101620
|
-
const parent =
|
|
101707
|
+
const parent = import_node_path105.default.dirname(dylib);
|
|
101621
101708
|
let present = libraryDirectories.get(parent);
|
|
101622
101709
|
if (present === void 0) {
|
|
101623
|
-
present =
|
|
101710
|
+
present = import_node_fs103.default.existsSync(parent);
|
|
101624
101711
|
libraryDirectories.set(parent, present);
|
|
101625
101712
|
}
|
|
101626
101713
|
if (!present) continue;
|
|
101627
|
-
if (
|
|
101714
|
+
if (import_node_fs103.default.existsSync(dylib) || import_node_fs103.default.existsSync(file("tbd"))) break;
|
|
101628
101715
|
const staticLibrary = file("a");
|
|
101629
|
-
if (!
|
|
101716
|
+
if (!import_node_fs103.default.existsSync(staticLibrary)) continue;
|
|
101630
101717
|
archive = staticLibrary;
|
|
101631
101718
|
break;
|
|
101632
101719
|
}
|
|
@@ -101723,7 +101810,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
101723
101810
|
for (const token of tokens2) {
|
|
101724
101811
|
if (token.startsWith("-")) break;
|
|
101725
101812
|
const file = resolve16(token);
|
|
101726
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
101813
|
+
if (file?.endsWith(".xcassets")) catalogs.push(import_node_path105.default.resolve(projectDir, file));
|
|
101727
101814
|
}
|
|
101728
101815
|
}
|
|
101729
101816
|
return catalogs;
|
|
@@ -101768,14 +101855,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
101768
101855
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
101769
101856
|
return [];
|
|
101770
101857
|
copies.push({
|
|
101771
|
-
from:
|
|
101772
|
-
to:
|
|
101858
|
+
from: import_node_path105.default.resolve(projectDir, operands[0]),
|
|
101859
|
+
to: import_node_path105.default.resolve(projectDir, operands[1])
|
|
101773
101860
|
});
|
|
101774
101861
|
}
|
|
101775
101862
|
return copies;
|
|
101776
101863
|
}
|
|
101777
101864
|
function fileListEntries(file, absolute) {
|
|
101778
|
-
return
|
|
101865
|
+
return import_node_fs103.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
101779
101866
|
}
|
|
101780
101867
|
function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
101781
101868
|
const { project: project2, target, id: targetId } = ref;
|
|
@@ -101789,17 +101876,17 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101789
101876
|
const copiedFiles = [];
|
|
101790
101877
|
let generatedInfoPlist = false;
|
|
101791
101878
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
101792
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
101879
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path105.default.resolve(project2.projectDir, declaredInfoPlist) : null;
|
|
101793
101880
|
const isPreparedOutput = (file) => file === infoPlistOutput || options2.requireSources !== false && file.endsWith(".swift");
|
|
101794
101881
|
let absentSources = false;
|
|
101795
101882
|
if (options2.prepareGeneratedSources === true && options2.requireSources !== false)
|
|
101796
101883
|
project2.visitMembers(
|
|
101797
101884
|
targetId,
|
|
101798
|
-
xcodePathResolver(project2.objects, project2.projectDir,
|
|
101799
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
101800
|
-
|
|
101885
|
+
xcodePathResolver(project2.objects, project2.projectDir, import_node_path105.default.join, settings),
|
|
101886
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs103.default.existsSync(file) ? [file] : [],
|
|
101887
|
+
import_node_path105.default.join,
|
|
101801
101888
|
(file, kind) => {
|
|
101802
|
-
if (kind !== "header" && kind !== "resource" && !
|
|
101889
|
+
if (kind !== "header" && kind !== "resource" && !import_node_fs103.default.existsSync(file))
|
|
101803
101890
|
absentSources = true;
|
|
101804
101891
|
}
|
|
101805
101892
|
);
|
|
@@ -101818,7 +101905,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101818
101905
|
copiedFiles.push(
|
|
101819
101906
|
...shellCopies(str2(phase.shellScript) ?? "", settings, project2.projectDir)
|
|
101820
101907
|
);
|
|
101821
|
-
const absolute = (raw2) =>
|
|
101908
|
+
const absolute = (raw2) => import_node_path105.default.resolve(project2.projectDir, expand(raw2, settings));
|
|
101822
101909
|
const inputs2 = list(phase.inputPaths).map(absolute);
|
|
101823
101910
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
101824
101911
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -101827,7 +101914,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101827
101914
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
101828
101915
|
).map((raw2) => {
|
|
101829
101916
|
const file = absolute(raw2);
|
|
101830
|
-
if (!
|
|
101917
|
+
if (!import_node_fs103.default.existsSync(file)) {
|
|
101831
101918
|
return { file, entries: [] };
|
|
101832
101919
|
}
|
|
101833
101920
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -101848,14 +101935,14 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101848
101935
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
101849
101936
|
];
|
|
101850
101937
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
101851
|
-
for (const file of inputFiles) if (
|
|
101938
|
+
for (const file of inputFiles) if (import_node_fs103.default.existsSync(file)) projectInputs.add(file);
|
|
101852
101939
|
}
|
|
101853
101940
|
const undeclaredGenerator = absentSources && beforeSources && allOutputs.length === 0 && str2(phase.runOnlyForDeploymentPostprocessing) !== "1";
|
|
101854
101941
|
if (options2.prepareGeneratedSources === true && (allOutputs.some(isPreparedOutput) || undeclaredGenerator)) {
|
|
101855
|
-
const phaseDir =
|
|
101942
|
+
const phaseDir = import_node_path105.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
101856
101943
|
for (const lists of fileLists.values())
|
|
101857
101944
|
for (const { file } of lists)
|
|
101858
|
-
if (!
|
|
101945
|
+
if (!import_node_fs103.default.existsSync(file))
|
|
101859
101946
|
throw new Error(
|
|
101860
101947
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
101861
101948
|
);
|
|
@@ -101874,7 +101961,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101874
101961
|
const lists = fileLists.get(kind);
|
|
101875
101962
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
101876
101963
|
lists.forEach((_item, index) => {
|
|
101877
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
101964
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path105.default.join(
|
|
101878
101965
|
phaseDir,
|
|
101879
101966
|
`${kind}-${index}.xcfilelist`
|
|
101880
101967
|
);
|
|
@@ -101885,22 +101972,22 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101885
101972
|
);
|
|
101886
101973
|
for (const file of inputFiles) {
|
|
101887
101974
|
signature2.update(file);
|
|
101888
|
-
if (
|
|
101889
|
-
const stat2 =
|
|
101975
|
+
if (import_node_fs103.default.existsSync(file)) {
|
|
101976
|
+
const stat2 = import_node_fs103.default.statSync(file);
|
|
101890
101977
|
signature2.update(`${stat2.mtimeMs}:${stat2.ctimeMs}:${stat2.size}`);
|
|
101891
101978
|
} else signature2.update("missing");
|
|
101892
101979
|
}
|
|
101893
101980
|
const stamp = signature2.digest("hex");
|
|
101894
101981
|
const key2 = `${project2.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
101895
|
-
if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) =>
|
|
101982
|
+
if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs103.default.existsSync(file)))
|
|
101896
101983
|
continue;
|
|
101897
|
-
|
|
101984
|
+
import_node_fs103.default.mkdirSync(phaseDir, { recursive: true });
|
|
101898
101985
|
if (process.platform === "linux") {
|
|
101899
101986
|
const bin = swiftToolchainBin(
|
|
101900
101987
|
privateSwiftRelease() ?? swiftNativePin().distribution.release
|
|
101901
101988
|
);
|
|
101902
|
-
const startup =
|
|
101903
|
-
|
|
101989
|
+
const startup = import_node_path105.default.join(phaseDir, "peach-tools.sh");
|
|
101990
|
+
import_node_fs103.default.writeFileSync(
|
|
101904
101991
|
startup,
|
|
101905
101992
|
'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
|
|
101906
101993
|
);
|
|
@@ -101909,15 +101996,15 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101909
101996
|
env.PEACH_PHASE_TOOLCHAIN = bin;
|
|
101910
101997
|
env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
|
|
101911
101998
|
env.BASH_ENV = startup;
|
|
101912
|
-
env.PATH = [bin, env.PATH].filter(Boolean).join(
|
|
101999
|
+
env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path105.default.delimiter);
|
|
101913
102000
|
}
|
|
101914
|
-
|
|
101915
|
-
|
|
102001
|
+
import_node_fs103.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
102002
|
+
import_node_fs103.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
101916
102003
|
for (const output of allOutputs)
|
|
101917
|
-
|
|
102004
|
+
import_node_fs103.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
|
|
101918
102005
|
for (const [kind, lists] of fileLists)
|
|
101919
102006
|
lists.forEach((item, index) => {
|
|
101920
|
-
|
|
102007
|
+
import_node_fs103.default.writeFileSync(
|
|
101921
102008
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
101922
102009
|
`${item.entries.join("\n")}
|
|
101923
102010
|
`
|
|
@@ -101925,9 +102012,9 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101925
102012
|
});
|
|
101926
102013
|
const rawScript = str2(phase.shellScript) ?? "";
|
|
101927
102014
|
if (rawScript.includes("generate-modules-provider")) {
|
|
101928
|
-
const preloadPath =
|
|
101929
|
-
|
|
101930
|
-
|
|
102015
|
+
const preloadPath = import_node_path105.default.join(phaseDir, "expo-scan-timeout.cjs");
|
|
102016
|
+
import_node_fs103.default.mkdirSync(phaseDir, { recursive: true });
|
|
102017
|
+
import_node_fs103.default.writeFileSync(
|
|
101931
102018
|
preloadPath,
|
|
101932
102019
|
[
|
|
101933
102020
|
"const cp = require('node:child_process');",
|
|
@@ -101965,7 +102052,7 @@ ${output}`
|
|
|
101965
102052
|
);
|
|
101966
102053
|
}
|
|
101967
102054
|
const missing2 = allOutputs.filter(
|
|
101968
|
-
(file) => file === infoPlistOutput && !
|
|
102055
|
+
(file) => file === infoPlistOutput && !import_node_fs103.default.existsSync(file)
|
|
101969
102056
|
);
|
|
101970
102057
|
if (missing2.length > 0)
|
|
101971
102058
|
throw new Error(
|
|
@@ -101976,9 +102063,9 @@ ${output}`
|
|
|
101976
102063
|
}
|
|
101977
102064
|
project2.visitMembers(
|
|
101978
102065
|
targetId,
|
|
101979
|
-
xcodePathResolver(project2.objects, project2.projectDir,
|
|
101980
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
101981
|
-
|
|
102066
|
+
xcodePathResolver(project2.objects, project2.projectDir, import_node_path105.default.join, settings),
|
|
102067
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs103.default.existsSync(file) ? [file] : [],
|
|
102068
|
+
import_node_path105.default.join,
|
|
101982
102069
|
(file, kind, bundleName) => {
|
|
101983
102070
|
if (kind === "header") {
|
|
101984
102071
|
headers.add(file);
|
|
@@ -101989,9 +102076,9 @@ ${output}`
|
|
|
101989
102076
|
if (bundleName) resourceNames[file] = bundleName;
|
|
101990
102077
|
return;
|
|
101991
102078
|
}
|
|
101992
|
-
if (!
|
|
102079
|
+
if (!import_node_fs103.default.existsSync(file)) {
|
|
101993
102080
|
if (options2.requireSources === false) return;
|
|
101994
|
-
const script = scriptForOutput.get(
|
|
102081
|
+
const script = scriptForOutput.get(import_node_path105.default.normalize(file));
|
|
101995
102082
|
throw new Error(
|
|
101996
102083
|
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}`
|
|
101997
102084
|
);
|
|
@@ -102002,21 +102089,21 @@ ${output}`
|
|
|
102002
102089
|
);
|
|
102003
102090
|
if (options2.prepareGeneratedSources && options2.requireSources !== false) {
|
|
102004
102091
|
const interfaceFiles = [...resources].filter(
|
|
102005
|
-
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(
|
|
102092
|
+
(file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path105.default.sep).some((part) => part.endsWith(".bundle"))
|
|
102006
102093
|
);
|
|
102007
102094
|
let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
|
|
102008
|
-
if (process.platform !== "darwin" && !launchName && infoPlistOutput &&
|
|
102009
|
-
const info = parsePlist(
|
|
102095
|
+
if (process.platform !== "darwin" && !launchName && infoPlistOutput && import_node_fs103.default.existsSync(infoPlistOutput)) {
|
|
102096
|
+
const info = parsePlist(import_node_fs103.default.readFileSync(infoPlistOutput, "utf8"));
|
|
102010
102097
|
const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
|
|
102011
102098
|
if (typeof declared === "string") launchName = expand(declared, settings);
|
|
102012
102099
|
}
|
|
102013
102100
|
const interfaceOutputs = /* @__PURE__ */ new Set();
|
|
102014
102101
|
for (const file of interfaceFiles) {
|
|
102015
|
-
const localization = file.split(
|
|
102102
|
+
const localization = file.split(import_node_path105.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
102016
102103
|
const isStoryboard = file.endsWith(".storyboard");
|
|
102017
102104
|
const extension = isStoryboard ? ".storyboardc" : ".nib";
|
|
102018
|
-
const name3 =
|
|
102019
|
-
const output =
|
|
102105
|
+
const name3 = import_node_path105.default.basename(file, import_node_path105.default.extname(file));
|
|
102106
|
+
const output = import_node_path105.default.join(
|
|
102020
102107
|
settings("DERIVED_FILE_DIR"),
|
|
102021
102108
|
"InterfaceBuilder",
|
|
102022
102109
|
localization,
|
|
@@ -102035,10 +102122,10 @@ ${output}`
|
|
|
102035
102122
|
const inputs2 = JSON.stringify([
|
|
102036
102123
|
1,
|
|
102037
102124
|
args,
|
|
102038
|
-
(0, import_node_crypto61.createHash)("sha256").update(
|
|
102125
|
+
(0, import_node_crypto61.createHash)("sha256").update(import_node_fs103.default.readFileSync(file)).digest("hex")
|
|
102039
102126
|
]);
|
|
102040
102127
|
const developer = settings("DEVELOPER_DIR");
|
|
102041
|
-
const cached5 =
|
|
102128
|
+
const cached5 = import_node_fs103.default.existsSync(output) && import_node_fs103.default.existsSync(stamp) ? import_node_fs103.default.readFileSync(stamp, "utf8").split("\n") : [];
|
|
102042
102129
|
projectInputs.add(file);
|
|
102043
102130
|
resources.delete(file);
|
|
102044
102131
|
if (cached5[0] !== inputs2 || process.platform === "darwin" && cached5[1] !== developer) {
|
|
@@ -102048,15 +102135,15 @@ ${output}`
|
|
|
102048
102135
|
`${targetName}: Interface Builder compilation requires macOS and Xcode`
|
|
102049
102136
|
);
|
|
102050
102137
|
}
|
|
102051
|
-
|
|
102052
|
-
|
|
102053
|
-
|
|
102138
|
+
import_node_fs103.default.rmSync(output, { recursive: true, force: true });
|
|
102139
|
+
import_node_fs103.default.rmSync(stamp, { force: true });
|
|
102140
|
+
import_node_fs103.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
|
|
102054
102141
|
(0, import_node_child_process49.execFileSync)("xcrun", ["ibtool", "--compile", output, file, ...args], {
|
|
102055
102142
|
cwd: project2.projectDir,
|
|
102056
102143
|
stdio: ["ignore", "pipe", "pipe"],
|
|
102057
102144
|
timeout: runScriptTimeoutMs
|
|
102058
102145
|
});
|
|
102059
|
-
|
|
102146
|
+
import_node_fs103.default.writeFileSync(stamp, `${inputs2}
|
|
102060
102147
|
${developer}
|
|
102061
102148
|
`);
|
|
102062
102149
|
}
|
|
@@ -102098,33 +102185,33 @@ ${developer}
|
|
|
102098
102185
|
function commonAncestor(dirs) {
|
|
102099
102186
|
let common2 = dirs[0];
|
|
102100
102187
|
for (const dir of dirs) {
|
|
102101
|
-
while (common2 !==
|
|
102102
|
-
common2 =
|
|
102188
|
+
while (common2 !== import_node_path105.default.dirname(common2) && import_node_path105.default.relative(common2, dir).startsWith(".."))
|
|
102189
|
+
common2 = import_node_path105.default.dirname(common2);
|
|
102103
102190
|
}
|
|
102104
102191
|
return common2;
|
|
102105
102192
|
}
|
|
102106
102193
|
function installedPodsSandbox(pods) {
|
|
102107
|
-
const podfileLock =
|
|
102108
|
-
const manifestLock =
|
|
102109
|
-
if (!
|
|
102194
|
+
const podfileLock = import_node_path105.default.join(import_node_path105.default.dirname(pods), "Podfile.lock");
|
|
102195
|
+
const manifestLock = import_node_path105.default.join(pods, "Manifest.lock");
|
|
102196
|
+
if (!import_node_fs103.default.existsSync(podfileLock))
|
|
102110
102197
|
throw new Error(
|
|
102111
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
102198
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
|
|
102112
102199
|
);
|
|
102113
|
-
if (!
|
|
102200
|
+
if (!import_node_fs103.default.existsSync(manifestLock) || !import_node_fs103.default.readFileSync(manifestLock).equals(import_node_fs103.default.readFileSync(podfileLock)))
|
|
102114
102201
|
throw new Error(
|
|
102115
|
-
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${
|
|
102202
|
+
`The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
|
|
102116
102203
|
);
|
|
102117
102204
|
const specChecksums = {};
|
|
102118
|
-
const lines =
|
|
102205
|
+
const lines = import_node_fs103.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
102119
102206
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
102120
102207
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
102121
102208
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
102122
102209
|
if (!entry) break;
|
|
102123
102210
|
specChecksums[entry[1]] = entry[2];
|
|
102124
102211
|
}
|
|
102125
|
-
const specs =
|
|
102126
|
-
const generated =
|
|
102127
|
-
if (
|
|
102212
|
+
const specs = import_node_path105.default.join(pods, "Local Podspecs");
|
|
102213
|
+
const generated = import_node_path105.default.join(pods, POD_GRAPH_SPECIFICATIONS);
|
|
102214
|
+
if (import_node_fs103.default.existsSync(generated))
|
|
102128
102215
|
return {
|
|
102129
102216
|
podfileLock,
|
|
102130
102217
|
manifestLock,
|
|
@@ -102132,15 +102219,15 @@ function installedPodsSandbox(pods) {
|
|
|
102132
102219
|
localPodspecs: readPodGraphSpecifications(generated),
|
|
102133
102220
|
specificationFiles: [generated]
|
|
102134
102221
|
};
|
|
102135
|
-
const specificationFiles = isDirectory3(specs) ?
|
|
102222
|
+
const specificationFiles = isDirectory3(specs) ? import_node_fs103.default.readdirSync(specs).filter((name3) => name3.endsWith(".podspec.json")).sort().map((name3) => import_node_path105.default.join(specs, name3)) : [];
|
|
102136
102223
|
return {
|
|
102137
102224
|
podfileLock,
|
|
102138
102225
|
manifestLock,
|
|
102139
102226
|
specChecksums,
|
|
102140
102227
|
localPodspecs: new Map(
|
|
102141
102228
|
specificationFiles.map((file) => [
|
|
102142
|
-
|
|
102143
|
-
|
|
102229
|
+
import_node_path105.default.basename(file, ".podspec.json"),
|
|
102230
|
+
import_node_fs103.default.readFileSync(file, "utf8")
|
|
102144
102231
|
])
|
|
102145
102232
|
),
|
|
102146
102233
|
specificationFiles
|
|
@@ -102155,14 +102242,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
102155
102242
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
102156
102243
|
if (installedPods && isPodsProject(xcodeproj))
|
|
102157
102244
|
throw new Error(
|
|
102158
|
-
`${
|
|
102245
|
+
`${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))}`
|
|
102159
102246
|
);
|
|
102160
102247
|
return;
|
|
102161
102248
|
}
|
|
102162
|
-
const key2 =
|
|
102163
|
-
if (projectAt.has(key2) || !installedPods && key2.split(
|
|
102249
|
+
const key2 = import_node_fs103.default.realpathSync.native(xcodeproj);
|
|
102250
|
+
if (projectAt.has(key2) || !installedPods && key2.split(import_node_path105.default.sep).includes("Pods"))
|
|
102164
102251
|
return;
|
|
102165
|
-
if (isPodsProject(key2)) cocoapods = installedPodsSandbox(
|
|
102252
|
+
if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path105.default.dirname(key2));
|
|
102166
102253
|
const project2 = loadProject(key2);
|
|
102167
102254
|
projectAt.set(key2, project2);
|
|
102168
102255
|
projects2.push(project2);
|
|
@@ -102178,12 +102265,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
102178
102265
|
for (const reference of listed)
|
|
102179
102266
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
102180
102267
|
if (projects2.length === 0) {
|
|
102181
|
-
throw new Error(`${
|
|
102268
|
+
throw new Error(`${import_node_path105.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
102182
102269
|
}
|
|
102183
|
-
const podfile =
|
|
102184
|
-
if (installedPods && !cocoapods &&
|
|
102270
|
+
const podfile = import_node_path105.default.join(import_node_path105.default.dirname(xcodeprojOrWorkspace), "Podfile");
|
|
102271
|
+
if (installedPods && !cocoapods && import_node_fs103.default.existsSync(podfile))
|
|
102185
102272
|
throw new Error(
|
|
102186
|
-
`${podfile} is not installed into ${
|
|
102273
|
+
`${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`
|
|
102187
102274
|
);
|
|
102188
102275
|
return { listed, projects: projects2, projectAt, cocoapods };
|
|
102189
102276
|
}
|
|
@@ -102220,7 +102307,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options2 = {}) {
|
|
|
102220
102307
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options2)).map((ref) => str2(ref.target.name) ?? ref.id);
|
|
102221
102308
|
}
|
|
102222
102309
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
102223
|
-
const project2 = loadProject(
|
|
102310
|
+
const project2 = loadProject(import_node_fs103.default.realpathSync.native(xcodeproj));
|
|
102224
102311
|
for (const [id, target] of Object.entries(project2.objects)) {
|
|
102225
102312
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
102226
102313
|
if (isIosAppTarget({ project: project2, id, target }, { requireSources: false }))
|
|
@@ -102228,7 +102315,7 @@ function defaultXcodeAppTarget(xcodeproj) {
|
|
|
102228
102315
|
}
|
|
102229
102316
|
}
|
|
102230
102317
|
function readXcodeExtensionTargets(input) {
|
|
102231
|
-
return workspaceProjects(
|
|
102318
|
+
return workspaceProjects(import_node_fs103.default.realpathSync.native(input)).projects.flatMap(
|
|
102232
102319
|
(project2) => projectTargets(project2).flatMap((ref) => {
|
|
102233
102320
|
if (ref.target.productType !== APP_EXTENSION) return [];
|
|
102234
102321
|
const name3 = str2(ref.target.name) ?? ref.id;
|
|
@@ -102245,7 +102332,7 @@ function readXcodeExtensionTargets(input) {
|
|
|
102245
102332
|
const infoFile = get2("INFOPLIST_FILE");
|
|
102246
102333
|
if (!infoFile) throw new Error(`${name3}: extension has no INFOPLIST_FILE`);
|
|
102247
102334
|
const info = parsePlist(
|
|
102248
|
-
|
|
102335
|
+
import_node_fs103.default.readFileSync(import_node_path105.default.resolve(project2.projectDir, infoFile), "utf8")
|
|
102249
102336
|
);
|
|
102250
102337
|
if (!isRecord(info))
|
|
102251
102338
|
throw new Error(`${name3}: extension Info.plist is not a dictionary`);
|
|
@@ -102268,30 +102355,30 @@ function readXcodeExtensionTargets(input) {
|
|
|
102268
102355
|
);
|
|
102269
102356
|
}
|
|
102270
102357
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
102271
|
-
const container =
|
|
102358
|
+
const container = import_node_fs103.default.realpathSync.native(xcodeprojOrWorkspace);
|
|
102272
102359
|
const { projects: projects2 } = workspaceProjects(container);
|
|
102273
102360
|
const containers = [
|
|
102274
102361
|
.../* @__PURE__ */ new Set([container, ...projects2.map((project3) => project3.xcodeproj)])
|
|
102275
102362
|
];
|
|
102276
102363
|
const found2 = containers.flatMap(
|
|
102277
102364
|
(dir) => [
|
|
102278
|
-
|
|
102279
|
-
...isDirectory3(
|
|
102365
|
+
import_node_path105.default.join(dir, "xcshareddata"),
|
|
102366
|
+
...isDirectory3(import_node_path105.default.join(dir, "xcuserdata")) ? import_node_fs103.default.readdirSync(import_node_path105.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path105.default.join(dir, "xcuserdata", user)) : []
|
|
102280
102367
|
].map((data) => ({
|
|
102281
102368
|
dir,
|
|
102282
|
-
file:
|
|
102369
|
+
file: import_node_path105.default.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
102283
102370
|
}))
|
|
102284
|
-
).find((candidate) =>
|
|
102371
|
+
).find((candidate) => import_node_fs103.default.existsSync(candidate.file));
|
|
102285
102372
|
if (!found2) {
|
|
102286
102373
|
const known = containers.flatMap(
|
|
102287
|
-
(dir) =>
|
|
102374
|
+
(dir) => import_node_fs103.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs103.default.readdirSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes")).filter((name4) => name4.endsWith(".xcscheme")).map((name4) => name4.slice(0, -".xcscheme".length)).sort() : []
|
|
102288
102375
|
);
|
|
102289
102376
|
throw new Error(
|
|
102290
|
-
`${
|
|
102377
|
+
`${import_node_path105.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
102291
102378
|
);
|
|
102292
102379
|
}
|
|
102293
102380
|
const launch2 = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
102294
|
-
|
|
102381
|
+
import_node_fs103.default.readFileSync(found2.file, "utf8")
|
|
102295
102382
|
);
|
|
102296
102383
|
const attribute2 = (text7, name4) => {
|
|
102297
102384
|
const value = new RegExp(`\\b${name4}\\s*=\\s*"([^"]*)"`).exec(text7)?.[1];
|
|
@@ -102304,12 +102391,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
102304
102391
|
if (!configuration2 || !blueprint || !referenced?.startsWith("container:")) {
|
|
102305
102392
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
102306
102393
|
}
|
|
102307
|
-
const projectPath =
|
|
102308
|
-
|
|
102394
|
+
const projectPath = import_node_path105.default.resolve(
|
|
102395
|
+
import_node_path105.default.dirname(found2.dir),
|
|
102309
102396
|
referenced.slice("container:".length)
|
|
102310
102397
|
);
|
|
102311
102398
|
const project2 = projects2.find(
|
|
102312
|
-
(candidate) =>
|
|
102399
|
+
(candidate) => import_node_fs103.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs103.default.realpathSync.native(projectPath)
|
|
102313
102400
|
);
|
|
102314
102401
|
const target = project2 && projectTargets(project2).find((ref) => ref.id === blueprint);
|
|
102315
102402
|
const name3 = target && str2(target.target.name);
|
|
@@ -102327,26 +102414,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
102327
102414
|
return { target: name3, configuration: configuration2 };
|
|
102328
102415
|
}
|
|
102329
102416
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
102330
|
-
const nested =
|
|
102331
|
-
const iosRoot =
|
|
102332
|
-
const entries2 =
|
|
102417
|
+
const nested = import_node_path105.default.join(projectRoot, "ios");
|
|
102418
|
+
const iosRoot = import_node_fs103.default.existsSync(nested) ? nested : projectRoot;
|
|
102419
|
+
const entries2 = import_node_fs103.default.readdirSync(iosRoot, { withFileTypes: true });
|
|
102333
102420
|
const projects2 = (entries2.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
102334
|
-
xcodeproj:
|
|
102421
|
+
xcodeproj: import_node_path105.default.join(iosRoot, entry.name),
|
|
102335
102422
|
workspace: null
|
|
102336
102423
|
})) : entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
102337
|
-
const workspace =
|
|
102424
|
+
const workspace = import_node_path105.default.join(iosRoot, entry.name);
|
|
102338
102425
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
102339
102426
|
xcodeproj: xcodeproj2,
|
|
102340
102427
|
workspace
|
|
102341
102428
|
}));
|
|
102342
102429
|
}).filter(
|
|
102343
|
-
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(
|
|
102430
|
+
({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path105.default.sep).includes("Pods") && import_node_fs103.default.existsSync(xcodeproj2)
|
|
102344
102431
|
).filter(
|
|
102345
102432
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
102346
102433
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
102347
102434
|
xcodeproj: xcodeproj2,
|
|
102348
102435
|
workspace,
|
|
102349
|
-
name:
|
|
102436
|
+
name: import_node_path105.default.basename(xcodeproj2)
|
|
102350
102437
|
}));
|
|
102351
102438
|
if (projects2.length === 0) return null;
|
|
102352
102439
|
if (projects2.length > 1 && !iosTarget) {
|
|
@@ -102385,13 +102472,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
102385
102472
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
102386
102473
|
if (!iosTarget) {
|
|
102387
102474
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
102388
|
-
const container =
|
|
102475
|
+
const container = import_node_fs103.default.existsSync(workspace) ? workspace : xcodeproj;
|
|
102389
102476
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
102390
|
-
if (
|
|
102477
|
+
if (import_node_fs103.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
102391
102478
|
return true;
|
|
102392
|
-
const users =
|
|
102393
|
-
return
|
|
102394
|
-
(user) =>
|
|
102479
|
+
const users = import_node_path105.default.join(dir, "xcuserdata");
|
|
102480
|
+
return import_node_fs103.default.existsSync(users) && import_node_fs103.default.readdirSync(users).some(
|
|
102481
|
+
(user) => import_node_fs103.default.existsSync(import_node_path105.default.join(users, user, "xcschemes", `${target}.xcscheme`))
|
|
102395
102482
|
);
|
|
102396
102483
|
});
|
|
102397
102484
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -102403,7 +102490,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
102403
102490
|
return { xcodeproj, target, workspace: project2.workspace };
|
|
102404
102491
|
}
|
|
102405
102492
|
async function resolveXcodeSwiftPackages(input, signal, target, configuration2) {
|
|
102406
|
-
if (
|
|
102493
|
+
if (import_node_fs103.default.existsSync(workspaceResolvedFile(import_node_fs103.default.realpathSync.native(input)))) return;
|
|
102407
102494
|
try {
|
|
102408
102495
|
readXcodeAppTarget(input, target, configuration2, {
|
|
102409
102496
|
installedPods: true,
|
|
@@ -102422,7 +102509,7 @@ async function resolveXcodeSwiftPackages(input, signal, target, configuration2)
|
|
|
102422
102509
|
function readXcodeAppTarget(input, targetName, configurationName, options2 = {}) {
|
|
102423
102510
|
if (isBazelPackage(input))
|
|
102424
102511
|
return readBazelAppTarget(input, targetName, configurationName, options2);
|
|
102425
|
-
const xcodeprojOrWorkspace =
|
|
102512
|
+
const xcodeprojOrWorkspace = import_node_fs103.default.realpathSync.native(input);
|
|
102426
102513
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
102427
102514
|
const { listed, projects: projects2, projectAt, cocoapods } = workspaceProjects(
|
|
102428
102515
|
xcodeprojOrWorkspace,
|
|
@@ -102433,7 +102520,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102433
102520
|
(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
|
|
102434
102521
|
);
|
|
102435
102522
|
const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
|
|
102436
|
-
const container =
|
|
102523
|
+
const container = import_node_path105.default.basename(xcodeprojOrWorkspace);
|
|
102437
102524
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
102438
102525
|
if (named.length !== 1) {
|
|
102439
102526
|
if (options2.frameworkMachOType)
|
|
@@ -102462,15 +102549,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102462
102549
|
for (const ref of allTargets) {
|
|
102463
102550
|
const product = ref.project.object(str2(ref.target.productReference));
|
|
102464
102551
|
const file = str2(product?.path);
|
|
102465
|
-
if (file && !byProduct.has(
|
|
102466
|
-
byProduct.set(
|
|
102552
|
+
if (file && !byProduct.has(import_node_path105.default.basename(file)))
|
|
102553
|
+
byProduct.set(import_node_path105.default.basename(file), ref);
|
|
102467
102554
|
}
|
|
102468
102555
|
const proxied = (project2, proxyId) => {
|
|
102469
102556
|
const proxy = project2.object(proxyId);
|
|
102470
102557
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
102471
102558
|
const portal = str2(proxy.containerPortal);
|
|
102472
102559
|
const portalPath = project2.resolvePath(portal ?? "");
|
|
102473
|
-
const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath &&
|
|
102560
|
+
const owner = project2.object(portal)?.isa === "PBXProject" ? project2 : portalPath && import_node_fs103.default.existsSync(portalPath) ? projectAt.get(import_node_fs103.default.realpathSync.native(portalPath)) : void 0;
|
|
102474
102561
|
const remote = str2(proxy.remoteGlobalIDString);
|
|
102475
102562
|
if (!owner || !remote) return void 0;
|
|
102476
102563
|
return projectTargets(owner).find(
|
|
@@ -102487,7 +102574,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102487
102574
|
const buildFile = project2.object(buildFileId);
|
|
102488
102575
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
102489
102576
|
const file = project2.object(str2(buildFile.fileRef));
|
|
102490
|
-
const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project2, str2(file.remoteRef)) : file && str2(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(
|
|
102577
|
+
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;
|
|
102491
102578
|
if (resolved)
|
|
102492
102579
|
found2.push({
|
|
102493
102580
|
target: resolved,
|
|
@@ -102568,7 +102655,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102568
102655
|
const otherProduct = productName(other);
|
|
102569
102656
|
for (const { file, visibility } of headerPhase(other)) {
|
|
102570
102657
|
if (visibility === "Project") continue;
|
|
102571
|
-
const key2 = `${otherProduct}/${
|
|
102658
|
+
const key2 = `${otherProduct}/${import_node_path105.default.basename(file)}`;
|
|
102572
102659
|
if (!headers.has(key2)) headers.set(key2, file);
|
|
102573
102660
|
}
|
|
102574
102661
|
}
|
|
@@ -102598,8 +102685,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102598
102685
|
ref.project.visitMembers(
|
|
102599
102686
|
ref.id,
|
|
102600
102687
|
ref.project.resolvePath,
|
|
102601
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
102602
|
-
|
|
102688
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs103.default.existsSync(file) ? [file] : [],
|
|
102689
|
+
import_node_path105.default.join,
|
|
102603
102690
|
(file, kind) => {
|
|
102604
102691
|
if (kind === "header") found2.push(file);
|
|
102605
102692
|
}
|
|
@@ -102615,12 +102702,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102615
102702
|
for (const ref of projectTargets(project2)) {
|
|
102616
102703
|
const product = productName(ref);
|
|
102617
102704
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
102618
|
-
const name3 =
|
|
102705
|
+
const name3 = import_node_path105.default.basename(file);
|
|
102619
102706
|
if (!entries2.has(name3))
|
|
102620
102707
|
entries2.set(name3, visibility !== "Project" ? `${product}/${name3}` : file);
|
|
102621
102708
|
}
|
|
102622
102709
|
for (const file of synchronizedHeaders(ref)) {
|
|
102623
|
-
const name3 =
|
|
102710
|
+
const name3 = import_node_path105.default.basename(file);
|
|
102624
102711
|
if (!entries2.has(name3)) entries2.set(name3, file);
|
|
102625
102712
|
}
|
|
102626
102713
|
}
|
|
@@ -102630,7 +102717,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102630
102717
|
if (folder === null) continue;
|
|
102631
102718
|
for (const file of walkFiles(folder)) {
|
|
102632
102719
|
if (!HEADER_FILE.test(file)) continue;
|
|
102633
|
-
const name3 =
|
|
102720
|
+
const name3 = import_node_path105.default.basename(file);
|
|
102634
102721
|
if (!entries2.has(name3)) entries2.set(name3, file);
|
|
102635
102722
|
}
|
|
102636
102723
|
}
|
|
@@ -102638,18 +102725,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102638
102725
|
for (const id of Object.keys(project2.objects)) {
|
|
102639
102726
|
if (project2.object(id)?.isa !== "PBXFileReference") continue;
|
|
102640
102727
|
const file = project2.resolvePath(id);
|
|
102641
|
-
if (file && HEADER_FILE.test(file) && !entries2.has(
|
|
102642
|
-
entries2.set(
|
|
102728
|
+
if (file && HEADER_FILE.test(file) && !entries2.has(import_node_path105.default.basename(file)))
|
|
102729
|
+
entries2.set(import_node_path105.default.basename(file), file);
|
|
102643
102730
|
}
|
|
102644
102731
|
const map2 = [...entries2];
|
|
102645
102732
|
projectHeaderMaps.set(project2, map2);
|
|
102646
102733
|
return map2;
|
|
102647
102734
|
};
|
|
102648
102735
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
102649
|
-
const buildDir = (project2) =>
|
|
102736
|
+
const buildDir = (project2) => import_node_path105.default.join(project2.projectDir, ".build/peach-xcode/Build");
|
|
102650
102737
|
const workspaceBuild = {
|
|
102651
|
-
SYMROOT:
|
|
102652
|
-
OBJROOT:
|
|
102738
|
+
SYMROOT: import_node_path105.default.join(buildDir(app.project), "Products"),
|
|
102739
|
+
OBJROOT: import_node_path105.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
102653
102740
|
};
|
|
102654
102741
|
const moduleTarget = (ref) => {
|
|
102655
102742
|
const name3 = str2(ref.target.name) ?? ref.id;
|
|
@@ -102665,16 +102752,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102665
102752
|
TARGET_NAME: name3,
|
|
102666
102753
|
TARGETNAME: "$(TARGET_NAME)",
|
|
102667
102754
|
PROJECT: "$(PROJECT_NAME)",
|
|
102668
|
-
PROJECT_NAME:
|
|
102755
|
+
PROJECT_NAME: import_node_path105.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
102669
102756
|
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
102670
102757
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
102671
102758
|
SRCROOT: ref.project.projectDir,
|
|
102672
102759
|
SOURCE_ROOT: ref.project.projectDir,
|
|
102673
102760
|
PROJECT_DIR: ref.project.projectDir,
|
|
102674
|
-
SYMROOT:
|
|
102761
|
+
SYMROOT: import_node_path105.default.join(buildDir(ref.project), "Products"),
|
|
102675
102762
|
BUILD_DIR: "$(SYMROOT)",
|
|
102676
102763
|
BUILD_ROOT: "$(SYMROOT)",
|
|
102677
|
-
OBJROOT:
|
|
102764
|
+
OBJROOT: import_node_path105.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
102678
102765
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
102679
102766
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
102680
102767
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -102723,7 +102810,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102723
102810
|
xcconfigs
|
|
102724
102811
|
);
|
|
102725
102812
|
const searchRules = recursiveSearchRules(settings2);
|
|
102726
|
-
const absolute = (file) =>
|
|
102813
|
+
const absolute = (file) => import_node_path105.default.resolve(ref.project.projectDir, file);
|
|
102727
102814
|
const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
|
|
102728
102815
|
const product = settings2("PRODUCT_NAME");
|
|
102729
102816
|
const moduleName2 = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -102754,7 +102841,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102754
102841
|
`${name3}: Swift compatibility header phase has no Swift producer sources`
|
|
102755
102842
|
);
|
|
102756
102843
|
const building2 = options2.prepareGeneratedSources && options2.requireSources !== false;
|
|
102757
|
-
const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ?
|
|
102844
|
+
const versioning = building2 && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
|
|
102758
102845
|
if (versioning) {
|
|
102759
102846
|
const version2 = settings2("CURRENT_PROJECT_VERSION");
|
|
102760
102847
|
const custom = [
|
|
@@ -102767,7 +102854,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102767
102854
|
].filter((key2) => settings2(key2));
|
|
102768
102855
|
if (custom.length)
|
|
102769
102856
|
throw new Error(
|
|
102770
|
-
`${name3}: Xcode generates ${
|
|
102857
|
+
`${name3}: Xcode generates ${import_node_path105.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
102771
102858
|
);
|
|
102772
102859
|
const symbol2 = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
102773
102860
|
const [major, minor] = version2.split(".");
|
|
@@ -102780,9 +102867,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102780
102867
|
` const double ${symbol2}VersionNumber __attribute__ ((used)) = (double)${number4};`,
|
|
102781
102868
|
""
|
|
102782
102869
|
].join("\n");
|
|
102783
|
-
if (!
|
|
102784
|
-
|
|
102785
|
-
|
|
102870
|
+
if (!import_node_fs103.default.existsSync(versioning) || import_node_fs103.default.readFileSync(versioning, "utf8") !== unit2) {
|
|
102871
|
+
import_node_fs103.default.mkdirSync(import_node_path105.default.dirname(versioning), { recursive: true });
|
|
102872
|
+
import_node_fs103.default.writeFileSync(versioning, unit2);
|
|
102786
102873
|
}
|
|
102787
102874
|
allSources.push(versioning);
|
|
102788
102875
|
}
|
|
@@ -102801,7 +102888,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102801
102888
|
const headerFiles3 = headerPhase(ref);
|
|
102802
102889
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
102803
102890
|
for (const { file, visibility } of headerFiles3) {
|
|
102804
|
-
const name4 =
|
|
102891
|
+
const name4 = import_node_path105.default.basename(file);
|
|
102805
102892
|
const published4 = visibility !== "Project";
|
|
102806
102893
|
if (!ownHeaders.has(name4))
|
|
102807
102894
|
ownHeaders.set(name4, published4 ? `${product}/${name4}` : file);
|
|
@@ -102809,35 +102896,35 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102809
102896
|
ownHeaders.set(`${product}/${name4}`, file);
|
|
102810
102897
|
}
|
|
102811
102898
|
for (const file of synchronizedHeaders(ref)) {
|
|
102812
|
-
const name4 =
|
|
102899
|
+
const name4 = import_node_path105.default.basename(file);
|
|
102813
102900
|
if (ownHeaders.has(name4)) continue;
|
|
102814
102901
|
ownHeaders.set(name4, file);
|
|
102815
102902
|
const qualified3 = `${product}/${name4}`;
|
|
102816
102903
|
if (!ownHeaders.has(qualified3)) ownHeaders.set(qualified3, file);
|
|
102817
102904
|
}
|
|
102818
102905
|
const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
|
|
102819
|
-
const wrapper =
|
|
102820
|
-
const publicHeaders =
|
|
102906
|
+
const wrapper = import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
102907
|
+
const publicHeaders = import_node_path105.default.resolve(
|
|
102821
102908
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
102822
|
-
settings2("PUBLIC_HEADERS_FOLDER_PATH") ||
|
|
102909
|
+
settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "Headers")
|
|
102823
102910
|
);
|
|
102824
|
-
const privateHeaders =
|
|
102911
|
+
const privateHeaders = import_node_path105.default.resolve(
|
|
102825
102912
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
102826
|
-
settings2("PRIVATE_HEADERS_FOLDER_PATH") ||
|
|
102913
|
+
settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "PrivateHeaders")
|
|
102827
102914
|
);
|
|
102828
102915
|
const moduleMap2 = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
102829
|
-
const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ?
|
|
102830
|
-
const frameworkCompatibility = frameworkUmbrella && moduleMap2 &&
|
|
102916
|
+
const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ? import_node_path105.default.join(import_node_path105.default.dirname(moduleMap2), `${moduleName2}-umbrella.h`) : null;
|
|
102917
|
+
const frameworkCompatibility = frameworkUmbrella && moduleMap2 && import_node_fs103.default.existsSync(moduleMap2) && import_node_fs103.default.existsSync(frameworkUmbrella) ? {
|
|
102831
102918
|
framework: true,
|
|
102832
102919
|
moduleMap: moduleMap2,
|
|
102833
102920
|
umbrella: frameworkUmbrella,
|
|
102834
|
-
outputModuleMap:
|
|
102835
|
-
outputUmbrella:
|
|
102921
|
+
outputModuleMap: import_node_path105.default.join(wrapper, "Modules", "module.modulemap"),
|
|
102922
|
+
outputUmbrella: import_node_path105.default.join(
|
|
102836
102923
|
wrapper,
|
|
102837
102924
|
"Headers",
|
|
102838
|
-
|
|
102925
|
+
import_node_path105.default.basename(frameworkUmbrella)
|
|
102839
102926
|
),
|
|
102840
|
-
outputHeader:
|
|
102927
|
+
outputHeader: import_node_path105.default.join(
|
|
102841
102928
|
wrapper,
|
|
102842
102929
|
"Headers",
|
|
102843
102930
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName2}-Swift.h`
|
|
@@ -102851,10 +102938,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102851
102938
|
outputUmbrella: compatibility.outputUmbrella,
|
|
102852
102939
|
outputHeader: compatibility.outputHeader
|
|
102853
102940
|
} : frameworkCompatibility;
|
|
102854
|
-
const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap2 &&
|
|
102941
|
+
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_fs103.default.existsSync(moduleMap2) ? import_node_fs103.default.readdirSync(import_node_path105.default.dirname(moduleMap2)).flatMap((entry) => {
|
|
102855
102942
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
102856
|
-
const file =
|
|
102857
|
-
return
|
|
102943
|
+
const file = import_node_path105.default.join(import_node_path105.default.dirname(moduleMap2), entry);
|
|
102944
|
+
return import_node_fs103.default.existsSync(file) ? [file] : [];
|
|
102858
102945
|
}) : [];
|
|
102859
102946
|
const fileFlags = {};
|
|
102860
102947
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -102940,15 +103027,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102940
103027
|
// xcode searches its products' include directory before
|
|
102941
103028
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
102942
103029
|
headerSearchPaths: [
|
|
102943
|
-
|
|
103030
|
+
import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
102944
103031
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
102945
103032
|
(raw2) => expandSearchPath(absolute(raw2), searchRules)
|
|
102946
103033
|
),
|
|
102947
|
-
|
|
103034
|
+
import_node_path105.default.join(
|
|
102948
103035
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
102949
103036
|
settings2("CURRENT_ARCH")
|
|
102950
103037
|
),
|
|
102951
|
-
|
|
103038
|
+
import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
102952
103039
|
settings2("DERIVED_FILE_DIR")
|
|
102953
103040
|
],
|
|
102954
103041
|
userHeaderSearchPaths: settingList(
|
|
@@ -102998,9 +103085,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102998
103085
|
...headerFiles3.flatMap(
|
|
102999
103086
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
103000
103087
|
[
|
|
103001
|
-
|
|
103088
|
+
import_node_path105.default.join(
|
|
103002
103089
|
visibility === "Public" ? publicHeaders : privateHeaders,
|
|
103003
|
-
|
|
103090
|
+
import_node_path105.default.basename(file)
|
|
103004
103091
|
),
|
|
103005
103092
|
file
|
|
103006
103093
|
]
|
|
@@ -103022,17 +103109,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103022
103109
|
);
|
|
103023
103110
|
return file && HEADER_FILE.test(file) ? [
|
|
103024
103111
|
[
|
|
103025
|
-
|
|
103112
|
+
import_node_path105.default.resolve(
|
|
103026
103113
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
103027
103114
|
destination,
|
|
103028
|
-
|
|
103115
|
+
import_node_path105.default.basename(file)
|
|
103029
103116
|
),
|
|
103030
103117
|
file
|
|
103031
103118
|
]
|
|
103032
103119
|
] : [];
|
|
103033
103120
|
});
|
|
103034
103121
|
}),
|
|
103035
|
-
...moduleMap2 ? [[
|
|
103122
|
+
...moduleMap2 ? [[import_node_path105.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
|
|
103036
103123
|
]) : Object.fromEntries([
|
|
103037
103124
|
...podHeaders.map((file) => [file, file]),
|
|
103038
103125
|
...moduleMap2 ? [[moduleMap2, moduleMap2]] : []
|
|
@@ -103043,6 +103130,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103043
103130
|
};
|
|
103044
103131
|
};
|
|
103045
103132
|
const builtTargets = order.map((ref) => ({ ref, ...moduleTarget(ref) }));
|
|
103133
|
+
const xcframeworkCopies = builtTargets.flatMap(
|
|
103134
|
+
({ ref, settings: settings2 }) => list(ref.target.buildPhases).flatMap((phaseId) => {
|
|
103135
|
+
const phase = ref.project.object(phaseId);
|
|
103136
|
+
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy XCFrameworks")
|
|
103137
|
+
return [];
|
|
103138
|
+
const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
|
|
103139
|
+
const files2 = (paths, lists) => [
|
|
103140
|
+
...list(paths).map(absolute),
|
|
103141
|
+
...list(lists).flatMap((raw2) => {
|
|
103142
|
+
const file = absolute(raw2);
|
|
103143
|
+
if (!import_node_fs103.default.existsSync(file)) return [];
|
|
103144
|
+
xcconfigs.add(file);
|
|
103145
|
+
return fileListEntries(file, absolute);
|
|
103146
|
+
})
|
|
103147
|
+
];
|
|
103148
|
+
const destinations = new Set(
|
|
103149
|
+
files2(phase.outputPaths, phase.outputFileListPaths).map(
|
|
103150
|
+
(file) => import_node_path105.default.dirname(file)
|
|
103151
|
+
)
|
|
103152
|
+
);
|
|
103153
|
+
const slices = files2(phase.inputPaths, phase.inputFileListPaths).flatMap(
|
|
103154
|
+
(file) => file.endsWith(".xcframework") && import_node_fs103.default.existsSync(file) ? [simulatorNativeLibrary(file)?.slice ?? []].flat() : []
|
|
103155
|
+
);
|
|
103156
|
+
return destinations.size === 1 && slices.length > 0 ? [{ destination: [...destinations][0], slices }] : [];
|
|
103157
|
+
})
|
|
103158
|
+
);
|
|
103159
|
+
const copiedSearchPath = (directory2) => {
|
|
103160
|
+
for (const { destination, slices } of xcframeworkCopies) {
|
|
103161
|
+
const rest = relativeInside(destination, directory2);
|
|
103162
|
+
if (rest === null) continue;
|
|
103163
|
+
const found2 = slices.map((slice) => import_node_path105.default.join(slice, rest)).filter((candidate) => isDirectory3(candidate));
|
|
103164
|
+
if (found2.length) return found2;
|
|
103165
|
+
}
|
|
103166
|
+
return [directory2];
|
|
103167
|
+
};
|
|
103168
|
+
if (xcframeworkCopies.length)
|
|
103169
|
+
for (const { module: module3 } of builtTargets) {
|
|
103170
|
+
const objc = module3.objc;
|
|
103171
|
+
if (!objc) continue;
|
|
103172
|
+
objc.headerSearchPaths = objc.headerSearchPaths.flatMap(copiedSearchPath);
|
|
103173
|
+
objc.userHeaderSearchPaths = objc.userHeaderSearchPaths.flatMap(copiedSearchPath);
|
|
103174
|
+
objc.frameworkSearchPaths = objc.frameworkSearchPaths.flatMap(copiedSearchPath);
|
|
103175
|
+
}
|
|
103046
103176
|
for (const { ref, module: module3, settings: settings2 } of builtTargets)
|
|
103047
103177
|
module3.targetDependencies = [
|
|
103048
103178
|
.../* @__PURE__ */ new Set([
|
|
@@ -103071,7 +103201,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103071
103201
|
const generate = settings2("GENERATE_INFOPLIST_FILE") === "YES";
|
|
103072
103202
|
if (!FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") || !plistSetting && !generate || module3.generatedInfoPlist && !options2.prepareGeneratedSources)
|
|
103073
103203
|
return { ref, framework: module3 };
|
|
103074
|
-
const file = plistSetting ?
|
|
103204
|
+
const file = plistSetting ? import_node_path105.default.resolve(ref.project.projectDir, plistSetting) : null;
|
|
103075
103205
|
if (file) xcconfigs.add(file);
|
|
103076
103206
|
const info2 = processedInfoPlist(module3.name, file, productSettings2, keys);
|
|
103077
103207
|
if (generate) {
|
|
@@ -103087,7 +103217,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103087
103217
|
});
|
|
103088
103218
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
103089
103219
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
103090
|
-
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) =>
|
|
103220
|
+
({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path105.default.dirname(file)).filter((dir) => import_node_fs103.default.existsSync(dir)) : []
|
|
103091
103221
|
);
|
|
103092
103222
|
const resourceProducts = [];
|
|
103093
103223
|
const bundleTargets = builtTargets.filter(
|
|
@@ -103098,7 +103228,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103098
103228
|
const phase = owner.ref.project.object(phaseId);
|
|
103099
103229
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
|
|
103100
103230
|
continue;
|
|
103101
|
-
const absolute = (raw2) =>
|
|
103231
|
+
const absolute = (raw2) => import_node_path105.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
|
|
103102
103232
|
const entries2 = (paths) => paths.flatMap((raw2) => {
|
|
103103
103233
|
const file = absolute(raw2);
|
|
103104
103234
|
xcconfigs.add(file);
|
|
@@ -103114,7 +103244,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103114
103244
|
].filter((file) => file.endsWith(".bundle"));
|
|
103115
103245
|
if (inputs2.length !== outputs.length)
|
|
103116
103246
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
103117
|
-
const destinationRoot =
|
|
103247
|
+
const destinationRoot = import_node_path105.default.join(
|
|
103118
103248
|
owner.settings("TARGET_BUILD_DIR"),
|
|
103119
103249
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
103120
103250
|
);
|
|
@@ -103123,24 +103253,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103123
103253
|
const file = str2(
|
|
103124
103254
|
target.ref.project.object(str2(target.ref.target.productReference))?.path
|
|
103125
103255
|
);
|
|
103126
|
-
return file &&
|
|
103256
|
+
return file && import_node_path105.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
103127
103257
|
});
|
|
103128
103258
|
if (!product && !isDirectory3(input2))
|
|
103129
103259
|
throw new Error(
|
|
103130
103260
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
103131
103261
|
);
|
|
103132
|
-
const destination =
|
|
103133
|
-
if (destination === ".." || destination.startsWith(`..${
|
|
103262
|
+
const destination = import_node_path105.default.relative(destinationRoot, outputs[index]);
|
|
103263
|
+
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))
|
|
103134
103264
|
throw new Error(
|
|
103135
103265
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
103136
103266
|
);
|
|
103137
|
-
const infoFile = product ?
|
|
103267
|
+
const infoFile = product ? import_node_path105.default.resolve(
|
|
103138
103268
|
product.ref.project.projectDir,
|
|
103139
103269
|
product.settings("INFOPLIST_FILE")
|
|
103140
103270
|
) : null;
|
|
103141
103271
|
if (infoFile) xcconfigs.add(infoFile);
|
|
103142
103272
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
103143
|
-
const bundlePath = prefix + destination.split(
|
|
103273
|
+
const bundlePath = prefix + destination.split(import_node_path105.default.sep).join("/");
|
|
103144
103274
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
103145
103275
|
throw new Error(
|
|
103146
103276
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -103151,20 +103281,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103151
103281
|
resources: product.module.resources,
|
|
103152
103282
|
infoPlist: buildPlist(
|
|
103153
103283
|
expandValue(
|
|
103154
|
-
parsePlist(
|
|
103284
|
+
parsePlist(import_node_fs103.default.readFileSync(infoFile, "utf8")),
|
|
103155
103285
|
product.productSettings
|
|
103156
103286
|
)
|
|
103157
103287
|
)
|
|
103158
103288
|
} : {
|
|
103159
|
-
resources:
|
|
103289
|
+
resources: import_node_fs103.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path105.default.join(entry.parentPath, entry.name)).sort(),
|
|
103160
103290
|
sourceRoot: input2
|
|
103161
103291
|
}
|
|
103162
103292
|
});
|
|
103163
103293
|
}
|
|
103164
103294
|
}
|
|
103165
103295
|
}
|
|
103166
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
103167
|
-
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ?
|
|
103296
|
+
const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path105.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
|
|
103297
|
+
const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path105.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
|
|
103168
103298
|
const infoPlistPending = module2.generatedInfoPlist && !options2.prepareGeneratedSources;
|
|
103169
103299
|
const info = processedInfoPlist(
|
|
103170
103300
|
module2.name,
|
|
@@ -103173,7 +103303,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103173
103303
|
settingKeys
|
|
103174
103304
|
);
|
|
103175
103305
|
const bundleIdentifier = productSettings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
|
|
103176
|
-
const entitlements = entitlementsFile ? parsePlist(
|
|
103306
|
+
const entitlements = entitlementsFile ? parsePlist(import_node_fs103.default.readFileSync(entitlementsFile, "utf8")) : void 0;
|
|
103177
103307
|
const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
|
|
103178
103308
|
entitlements,
|
|
103179
103309
|
(value) => expand(value, (key2) => {
|
|
@@ -103211,7 +103341,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103211
103341
|
};
|
|
103212
103342
|
}
|
|
103213
103343
|
const localPackageDirs = [
|
|
103214
|
-
...listed.filter((reference) =>
|
|
103344
|
+
...listed.filter((reference) => import_node_fs103.default.existsSync(import_node_path105.default.join(reference, "Package.swift"))),
|
|
103215
103345
|
...projects2.flatMap(
|
|
103216
103346
|
(project2) => Object.entries(project2.objects).flatMap(([id, entry]) => {
|
|
103217
103347
|
if (!isDict(entry)) return [];
|
|
@@ -103221,19 +103351,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103221
103351
|
const packages = [];
|
|
103222
103352
|
while (pending2.length > 0) {
|
|
103223
103353
|
const dir = pending2.pop();
|
|
103224
|
-
if (
|
|
103354
|
+
if (import_node_fs103.default.existsSync(import_node_path105.default.join(dir, "Package.swift"))) {
|
|
103225
103355
|
packages.push(dir);
|
|
103226
103356
|
continue;
|
|
103227
103357
|
}
|
|
103228
103358
|
if (!isDirectory3(dir)) continue;
|
|
103229
|
-
for (const child of
|
|
103359
|
+
for (const child of import_node_fs103.default.readdirSync(dir, { withFileTypes: true }))
|
|
103230
103360
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
103231
|
-
pending2.push(
|
|
103361
|
+
pending2.push(import_node_path105.default.join(dir, child.name));
|
|
103232
103362
|
}
|
|
103233
103363
|
return packages;
|
|
103234
103364
|
}
|
|
103235
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
103236
|
-
return candidate &&
|
|
103365
|
+
const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path105.default.resolve(project2.projectDir, str2(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project2.resolvePath(id) : null;
|
|
103366
|
+
return candidate && import_node_fs103.default.existsSync(import_node_path105.default.join(candidate, "Package.swift")) ? [candidate] : [];
|
|
103237
103367
|
})
|
|
103238
103368
|
)
|
|
103239
103369
|
];
|
|
@@ -103263,7 +103393,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103263
103393
|
if ((flag === "-framework" || flag === "-weak_framework") && name3)
|
|
103264
103394
|
sdkFrameworks.add(name3);
|
|
103265
103395
|
});
|
|
103266
|
-
const absolute = (raw2) =>
|
|
103396
|
+
const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
|
|
103267
103397
|
const requested = options2.nativeModules;
|
|
103268
103398
|
const includeBinary = (name3, dir) => {
|
|
103269
103399
|
if (!requested || nativeTargets2.has(ref) || requested.includes(name3) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
|
|
@@ -103275,14 +103405,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103275
103405
|
for (const directory2 of expandSearchPath(absolute(raw2), searchRules)) {
|
|
103276
103406
|
if (frameworkSearchDirectories.has(directory2)) continue;
|
|
103277
103407
|
frameworkSearchDirectories.add(directory2);
|
|
103278
|
-
if (!
|
|
103408
|
+
if (!import_node_fs103.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
|
|
103279
103409
|
continue;
|
|
103280
|
-
for (const entry of
|
|
103410
|
+
for (const entry of import_node_fs103.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
103281
103411
|
const name3 = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
103282
103412
|
if (!name3 || byProduct.has(entry.name) || searchedFrameworks.has(name3))
|
|
103283
103413
|
continue;
|
|
103284
|
-
const file =
|
|
103285
|
-
if (
|
|
103414
|
+
const file = import_node_path105.default.join(directory2, entry.name);
|
|
103415
|
+
if (import_node_fs103.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
103286
103416
|
searchedFrameworks.set(name3, file);
|
|
103287
103417
|
}
|
|
103288
103418
|
}
|
|
@@ -103290,9 +103420,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103290
103420
|
}
|
|
103291
103421
|
for (const raw2 of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
103292
103422
|
const dir = absolute(raw2);
|
|
103293
|
-
const modulemap =
|
|
103294
|
-
if (!
|
|
103295
|
-
const name3 = moduleMapName(
|
|
103423
|
+
const modulemap = import_node_path105.default.join(dir, "module.modulemap");
|
|
103424
|
+
if (!import_node_fs103.default.existsSync(modulemap)) continue;
|
|
103425
|
+
const name3 = moduleMapName(import_node_fs103.default.readFileSync(modulemap, "utf8"));
|
|
103296
103426
|
if (name3 && !binaryFrameworks.has(name3)) includeBinary(name3, dir);
|
|
103297
103427
|
}
|
|
103298
103428
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -103301,7 +103431,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103301
103431
|
const inputs2 = list(phase.inputPaths).map(absolute);
|
|
103302
103432
|
for (const raw2 of list(phase.inputFileListPaths)) {
|
|
103303
103433
|
const file = absolute(raw2);
|
|
103304
|
-
if (!
|
|
103434
|
+
if (!import_node_fs103.default.existsSync(file)) continue;
|
|
103305
103435
|
xcconfigs.add(file);
|
|
103306
103436
|
inputs2.push(...fileListEntries(file, absolute));
|
|
103307
103437
|
}
|
|
@@ -103366,7 +103496,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103366
103496
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
103367
103497
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
103368
103498
|
kind: "local",
|
|
103369
|
-
dir:
|
|
103499
|
+
dir: import_node_path105.default.resolve(
|
|
103370
103500
|
project2.projectDir,
|
|
103371
103501
|
str2(reference.relativePath) ?? ""
|
|
103372
103502
|
)
|
|
@@ -103400,14 +103530,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103400
103530
|
continue;
|
|
103401
103531
|
}
|
|
103402
103532
|
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
103403
|
-
byProduct.has(
|
|
103533
|
+
byProduct.has(import_node_path105.default.basename(rawPath)))
|
|
103404
103534
|
continue;
|
|
103405
103535
|
const resolved = fileId ? project2.resolvePath(fileId) : null;
|
|
103406
|
-
if (fileId && resolved !== null && !
|
|
103407
|
-
const parts2 = resolved.split(
|
|
103536
|
+
if (fileId && resolved !== null && !import_node_fs103.default.existsSync(resolved)) {
|
|
103537
|
+
const parts2 = resolved.split(import_node_path105.default.sep);
|
|
103408
103538
|
const pods = parts2.lastIndexOf("Pods");
|
|
103409
|
-
const sandbox = parts2.slice(0, pods + 1).join(
|
|
103410
|
-
if (!options2.installedPods && options2.requireSources === false && pods > 0 &&
|
|
103539
|
+
const sandbox = parts2.slice(0, pods + 1).join(import_node_path105.default.sep);
|
|
103540
|
+
if (!options2.installedPods && options2.requireSources === false && pods > 0 && import_node_fs103.default.existsSync(import_node_path105.default.join(import_node_path105.default.dirname(sandbox), "Podfile")))
|
|
103411
103541
|
continue;
|
|
103412
103542
|
if (!ios_sdk_frameworks_default.frameworks.includes(name3))
|
|
103413
103543
|
throw new Error(
|
|
@@ -103435,7 +103565,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103435
103565
|
({ product }) => !options2.nativeModules || nativeTargets2.has(built2.ref) || options2.nativeModules.includes(product)
|
|
103436
103566
|
);
|
|
103437
103567
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
103438
|
-
let packageResolved =
|
|
103568
|
+
let packageResolved = import_node_fs103.default.existsSync(resolvedFile) ? [import_node_fs103.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path105.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs103.default.existsSync(file)).map((file) => import_node_fs103.default.realpathSync.native(file)).sort();
|
|
103439
103569
|
if (packageResolved.length === 0) {
|
|
103440
103570
|
const requirements = remotePackageRequirements(projects2);
|
|
103441
103571
|
if (requirements.length > 0) {
|
|
@@ -103491,19 +103621,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103491
103621
|
} : {},
|
|
103492
103622
|
rootDir: commonAncestor(
|
|
103493
103623
|
[
|
|
103494
|
-
workspace ?
|
|
103624
|
+
workspace ? import_node_path105.default.dirname(workspace) : app.project.projectDir,
|
|
103495
103625
|
...used.map((project2) => project2.projectDir),
|
|
103496
103626
|
...localPackageDirs,
|
|
103497
103627
|
...linkedProducts.flatMap(
|
|
103498
|
-
({ source }) => source.kind === "local" &&
|
|
103628
|
+
({ source }) => source.kind === "local" && import_node_fs103.default.existsSync(source.dir) ? [source.dir] : []
|
|
103499
103629
|
),
|
|
103500
103630
|
...new Set(podSourceDirs),
|
|
103501
103631
|
// a target's own files may sit beside the project, such as an asset
|
|
103502
103632
|
// catalog one folder up, and xcode builds them from there
|
|
103503
103633
|
...new Set(
|
|
103504
|
-
[...module2.allSources, ...module2.resources].filter((file) =>
|
|
103634
|
+
[...module2.allSources, ...module2.resources].filter((file) => import_node_fs103.default.existsSync(file)).map((file) => import_node_path105.default.dirname(file))
|
|
103505
103635
|
)
|
|
103506
|
-
].map((dir) =>
|
|
103636
|
+
].map((dir) => import_node_fs103.default.realpathSync.native(dir))
|
|
103507
103637
|
),
|
|
103508
103638
|
projectFiles: [
|
|
103509
103639
|
.../* @__PURE__ */ new Set([
|
|
@@ -103529,7 +103659,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103529
103659
|
resourceProducts,
|
|
103530
103660
|
linkedProducts,
|
|
103531
103661
|
localPackageDirs: [
|
|
103532
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
103662
|
+
...new Set(localPackageDirs.map((dir) => import_node_fs103.default.realpathSync.native(dir)))
|
|
103533
103663
|
].sort(),
|
|
103534
103664
|
binaryFrameworks: [...binaryFrameworks].map(([name3, file]) => ({ name: name3, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
103535
103665
|
sdkFrameworks: [...sdkFrameworks].filter(
|
|
@@ -103542,15 +103672,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103542
103672
|
cocoapods
|
|
103543
103673
|
};
|
|
103544
103674
|
}
|
|
103545
|
-
var import_node_child_process49, import_node_crypto61,
|
|
103675
|
+
var import_node_child_process49, import_node_crypto61, import_node_fs103, 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;
|
|
103546
103676
|
var init_xcode_project = __esm({
|
|
103547
103677
|
"src/xcode-project.ts"() {
|
|
103548
103678
|
"use strict";
|
|
103549
103679
|
import_node_child_process49 = require("node:child_process");
|
|
103550
103680
|
import_node_crypto61 = require("node:crypto");
|
|
103551
|
-
|
|
103681
|
+
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
103552
103682
|
import_node_module9 = require("node:module");
|
|
103553
|
-
|
|
103683
|
+
import_node_path105 = __toESM(require("node:path"), 1);
|
|
103554
103684
|
init_bazel_project();
|
|
103555
103685
|
init_ios_sdk_frameworks();
|
|
103556
103686
|
init_is_record();
|
|
@@ -103562,7 +103692,9 @@ var init_xcode_project = __esm({
|
|
|
103562
103692
|
init_swift_distribution();
|
|
103563
103693
|
init_swift_native_pin();
|
|
103564
103694
|
init_swift_package();
|
|
103695
|
+
init_swift_source_file();
|
|
103565
103696
|
init_swift_toolchain();
|
|
103697
|
+
init_swift_xcframework();
|
|
103566
103698
|
init_xcode_intents();
|
|
103567
103699
|
init_xcode_json_project();
|
|
103568
103700
|
init_xcode_swift_features();
|
|
@@ -103615,15 +103747,15 @@ var init_xcode_project = __esm({
|
|
|
103615
103747
|
arch: "arm64",
|
|
103616
103748
|
variant: "normal"
|
|
103617
103749
|
};
|
|
103618
|
-
isDirectory3 = (dir) =>
|
|
103750
|
+
isDirectory3 = (dir) => import_node_fs103.default.existsSync(dir) && import_node_fs103.default.statSync(dir).isDirectory();
|
|
103619
103751
|
loaded3 = /* @__PURE__ */ new Map();
|
|
103620
103752
|
preparedSourcePhases = /* @__PURE__ */ new Map();
|
|
103621
|
-
isPodsProject = (xcodeproj) =>
|
|
103753
|
+
isPodsProject = (xcodeproj) => import_node_path105.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path105.default.basename(import_node_path105.default.dirname(xcodeproj)) === "Pods";
|
|
103622
103754
|
targetRefs = /* @__PURE__ */ new WeakMap();
|
|
103623
103755
|
NativeAppTargetSelectionError = class extends Error {
|
|
103624
103756
|
};
|
|
103625
|
-
workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
103626
|
-
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace :
|
|
103757
|
+
workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path105.default.join(
|
|
103758
|
+
xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path105.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
|
|
103627
103759
|
"xcshareddata",
|
|
103628
103760
|
"swiftpm",
|
|
103629
103761
|
"Package.resolved"
|
|
@@ -103659,7 +103791,7 @@ function workspacePackageManager(root, declared, excluded) {
|
|
|
103659
103791
|
{ manager: "yarn", files: ["yarn.lock"] },
|
|
103660
103792
|
{ manager: "npm", files: ["package-lock.json"] }
|
|
103661
103793
|
].filter(
|
|
103662
|
-
({ files: files2 }) => files2.some((file) => !excluded(file) &&
|
|
103794
|
+
({ files: files2 }) => files2.some((file) => !excluded(file) && import_node_fs104.default.existsSync(import_node_path106.default.join(root, file)))
|
|
103663
103795
|
);
|
|
103664
103796
|
if (locks.length !== 1) return manager;
|
|
103665
103797
|
const lockedManager = locks[0].manager;
|
|
@@ -103673,9 +103805,9 @@ function pinnedNodeVersion(root, manifest) {
|
|
|
103673
103805
|
return exactVersionFile(root, ".nvmrc") ?? exactVersionFile(root, ".node-version");
|
|
103674
103806
|
}
|
|
103675
103807
|
function exactVersionFile(root, name3) {
|
|
103676
|
-
const file =
|
|
103677
|
-
if (!
|
|
103678
|
-
const version2 =
|
|
103808
|
+
const file = import_node_path106.default.join(root, name3);
|
|
103809
|
+
if (!import_node_fs104.default.existsSync(file)) return null;
|
|
103810
|
+
const version2 = import_node_fs104.default.readFileSync(file, "utf8").trim().replace(/^v/, "");
|
|
103679
103811
|
return EXACT_VERSION.test(version2) ? version2 : null;
|
|
103680
103812
|
}
|
|
103681
103813
|
async function hashExpoWorkspace(app, signal) {
|
|
@@ -103687,15 +103819,15 @@ async function hashExpoSourceWorkspace(app, signal) {
|
|
|
103687
103819
|
return { root, hash };
|
|
103688
103820
|
}
|
|
103689
103821
|
function pnpmStoreArgs(root) {
|
|
103690
|
-
const modules =
|
|
103691
|
-
if (!
|
|
103822
|
+
const modules = import_node_path106.default.join(root, "node_modules", ".modules.yaml");
|
|
103823
|
+
if (!import_node_fs104.default.existsSync(modules)) return [];
|
|
103692
103824
|
const store = /^\s*"?storeDir"?:\s*["']?([^"'\n,]+)/m.exec(
|
|
103693
|
-
|
|
103825
|
+
import_node_fs104.default.readFileSync(modules, "utf8")
|
|
103694
103826
|
);
|
|
103695
103827
|
return store ? ["--store-dir", store[1]] : [];
|
|
103696
103828
|
}
|
|
103697
103829
|
function linkedPackageDirectories(root, app) {
|
|
103698
|
-
const appRelative =
|
|
103830
|
+
const appRelative = import_node_path106.default.relative(root, app);
|
|
103699
103831
|
return localPackageDirectories(root, app).filter(
|
|
103700
103832
|
(directory2) => directory2 !== "" && directory2 !== appRelative
|
|
103701
103833
|
);
|
|
@@ -103703,11 +103835,11 @@ function linkedPackageDirectories(root, app) {
|
|
|
103703
103835
|
function localPackageDirectories(root, app) {
|
|
103704
103836
|
const directories = /* @__PURE__ */ new Set();
|
|
103705
103837
|
const visit3 = (directory2) => {
|
|
103706
|
-
const relative7 =
|
|
103838
|
+
const relative7 = import_node_path106.default.relative(root, directory2);
|
|
103707
103839
|
if (directories.has(relative7)) return;
|
|
103708
103840
|
directories.add(relative7);
|
|
103709
103841
|
const manifest = JSON.parse(
|
|
103710
|
-
|
|
103842
|
+
import_node_fs104.default.readFileSync(import_node_path106.default.join(directory2, "package.json"), "utf8")
|
|
103711
103843
|
);
|
|
103712
103844
|
for (const name3 of Object.keys({
|
|
103713
103845
|
...manifest.dependencies,
|
|
@@ -103715,12 +103847,12 @@ function localPackageDirectories(root, app) {
|
|
|
103715
103847
|
...manifest.peerDependencies,
|
|
103716
103848
|
...manifest.optionalDependencies
|
|
103717
103849
|
})) {
|
|
103718
|
-
for (let at = directory2; ; at =
|
|
103719
|
-
const link =
|
|
103720
|
-
if (
|
|
103721
|
-
const target =
|
|
103722
|
-
const within2 =
|
|
103723
|
-
if (!within2.startsWith("..") && !within2.split(
|
|
103850
|
+
for (let at = directory2; ; at = import_node_path106.default.dirname(at)) {
|
|
103851
|
+
const link = import_node_path106.default.join(at, "node_modules", name3);
|
|
103852
|
+
if (import_node_fs104.default.existsSync(link)) {
|
|
103853
|
+
const target = import_node_fs104.default.realpathSync(link);
|
|
103854
|
+
const within2 = import_node_path106.default.relative(root, target);
|
|
103855
|
+
if (!within2.startsWith("..") && !within2.split(import_node_path106.default.sep).includes("node_modules") && import_node_fs104.default.existsSync(import_node_path106.default.join(target, "package.json")))
|
|
103724
103856
|
visit3(target);
|
|
103725
103857
|
break;
|
|
103726
103858
|
}
|
|
@@ -103732,7 +103864,7 @@ function localPackageDirectories(root, app) {
|
|
|
103732
103864
|
return [...directories];
|
|
103733
103865
|
}
|
|
103734
103866
|
async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, podsEnvironment = reactNativePodsEnvironment()) {
|
|
103735
|
-
app =
|
|
103867
|
+
app = import_node_fs104.default.realpathSync(app);
|
|
103736
103868
|
const key2 = JSON.stringify([app, everyByte, sourceOnly, podsEnvironment]);
|
|
103737
103869
|
let pending2 = hashing.get(key2);
|
|
103738
103870
|
if (!pending2) {
|
|
@@ -103752,22 +103884,22 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103752
103884
|
sourceOnly,
|
|
103753
103885
|
linkedPackageDirectories(root, app)
|
|
103754
103886
|
);
|
|
103755
|
-
const appRelative =
|
|
103756
|
-
const manifest = JSON.parse(
|
|
103887
|
+
const appRelative = import_node_path106.default.relative(root, app);
|
|
103888
|
+
const manifest = JSON.parse(import_node_fs104.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
|
|
103757
103889
|
const hash = (0, import_node_crypto62.createHash)("sha256");
|
|
103758
103890
|
const native = (0, import_node_crypto62.createHash)("sha256");
|
|
103759
103891
|
const nativeDirectories = localPackageDirectories(root, app);
|
|
103760
103892
|
const versionFree = new Set(
|
|
103761
103893
|
nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
|
|
103762
|
-
(directory2) => !
|
|
103763
|
-
).map((directory2) => directory2.split(
|
|
103894
|
+
(directory2) => !import_node_fs104.default.readdirSync(import_node_path106.default.join(root, directory2)).some((name3) => NATIVE_PACKAGE_ENTRY.test(name3))
|
|
103895
|
+
).map((directory2) => directory2.split(import_node_path106.default.sep).join("/"))
|
|
103764
103896
|
);
|
|
103765
103897
|
const versioned = new Set(
|
|
103766
|
-
nativeDirectories.map((directory2) => directory2.split(
|
|
103898
|
+
nativeDirectories.map((directory2) => directory2.split(import_node_path106.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
|
|
103767
103899
|
);
|
|
103768
103900
|
const nativeConfigBytes = (posix2, bytes) => {
|
|
103769
|
-
const directory2 =
|
|
103770
|
-
if (
|
|
103901
|
+
const directory2 = import_node_path106.default.posix.dirname(posix2);
|
|
103902
|
+
if (import_node_path106.default.posix.basename(posix2) === "package.json" && versionFree.has(directory2)) {
|
|
103771
103903
|
const { version: _version, ...manifest2 } = JSON.parse(bytes.toString("utf8"));
|
|
103772
103904
|
return JSON.stringify(manifest2);
|
|
103773
103905
|
}
|
|
@@ -103781,21 +103913,21 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103781
103913
|
return !(workspaces && entry && !versioned.has(entry) && /^ {6}"version": "[^"]*",$/.test(line));
|
|
103782
103914
|
}).join("\n");
|
|
103783
103915
|
};
|
|
103784
|
-
const steersNative = (relative7) => !relative7.includes(
|
|
103785
|
-
(directory2) => directory2 === "" || relative7 === directory2 || relative7.startsWith(directory2 +
|
|
103916
|
+
const steersNative = (relative7) => !relative7.includes(import_node_path106.default.sep) || relative7.startsWith(`patches${import_node_path106.default.sep}`) || relative7.startsWith(import_node_path106.default.join("scripts", "lib", "expo-plugins") + import_node_path106.default.sep) || nativeDirectories.some(
|
|
103917
|
+
(directory2) => directory2 === "" || relative7 === directory2 || relative7.startsWith(directory2 + import_node_path106.default.sep)
|
|
103786
103918
|
);
|
|
103787
103919
|
const steps = [];
|
|
103788
103920
|
const unread = [];
|
|
103789
103921
|
const walk4 = (directory2) => {
|
|
103790
|
-
const entries2 =
|
|
103922
|
+
const entries2 = import_node_fs104.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
103791
103923
|
for (const entry of entries2) {
|
|
103792
|
-
const file =
|
|
103793
|
-
const relative7 =
|
|
103924
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
103925
|
+
const relative7 = import_node_path106.default.relative(root, file);
|
|
103794
103926
|
if (excluded(relative7, entry.isDirectory())) continue;
|
|
103795
103927
|
const firstStep = steps.length;
|
|
103796
103928
|
steps.push(() => hash.update(`${relative7}\0`));
|
|
103797
103929
|
if (entry.isSymbolicLink()) {
|
|
103798
|
-
const link = `link\0${
|
|
103930
|
+
const link = `link\0${import_node_fs104.default.readlinkSync(file)}\0`;
|
|
103799
103931
|
steps.push(() => {
|
|
103800
103932
|
hash.update(link);
|
|
103801
103933
|
if (steersNative(relative7)) native.update(`${relative7}\0${link}`);
|
|
@@ -103805,9 +103937,9 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103805
103937
|
walk4(file);
|
|
103806
103938
|
if (sourceOnly && steps.length === firstStep + 2) steps.length = firstStep;
|
|
103807
103939
|
} else if (entry.isFile()) {
|
|
103808
|
-
const posix2 = relative7.split(
|
|
103940
|
+
const posix2 = relative7.split(import_node_path106.default.sep).join("/");
|
|
103809
103941
|
if (NATIVE_CONFIG_FILE.test(posix2)) {
|
|
103810
|
-
const bytes =
|
|
103942
|
+
const bytes = import_node_fs104.default.readFileSync(file);
|
|
103811
103943
|
steps.push(() => {
|
|
103812
103944
|
if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
|
|
103813
103945
|
if (steersNative(relative7))
|
|
@@ -103816,7 +103948,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103816
103948
|
continue;
|
|
103817
103949
|
}
|
|
103818
103950
|
if (everyByte) {
|
|
103819
|
-
const stat2 =
|
|
103951
|
+
const stat2 = import_node_fs104.default.statSync(file);
|
|
103820
103952
|
const known = fileDigests.get(file);
|
|
103821
103953
|
const content = known?.ino === stat2.ino && known.size === stat2.size && known.mtimeMs === stat2.mtimeMs && known.ctimeMs === stat2.ctimeMs ? known : {
|
|
103822
103954
|
ino: stat2.ino,
|
|
@@ -103837,7 +103969,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103837
103969
|
for (let start = 0; start < unread.length; start += 32) {
|
|
103838
103970
|
await Promise.all(
|
|
103839
103971
|
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
103840
|
-
const bytes = await
|
|
103972
|
+
const bytes = await import_node_fs104.default.promises.readFile(file);
|
|
103841
103973
|
content.size = bytes.length;
|
|
103842
103974
|
content.digest = (0, import_node_crypto62.createHash)("sha256").update(bytes).digest("hex");
|
|
103843
103975
|
fileDigests.set(file, content);
|
|
@@ -103884,13 +104016,13 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
103884
104016
|
const retire = (directory2, used) => withSwiftRootLock(
|
|
103885
104017
|
directory2,
|
|
103886
104018
|
async () => {
|
|
103887
|
-
const retired =
|
|
104019
|
+
const retired = import_node_path106.default.join(
|
|
103888
104020
|
parent,
|
|
103889
|
-
`${RETIRED_PREFIX2}${process.pid}-${
|
|
104021
|
+
`${RETIRED_PREFIX2}${process.pid}-${import_node_path106.default.basename(directory2)}`
|
|
103890
104022
|
);
|
|
103891
|
-
if (
|
|
104023
|
+
if (import_node_fs104.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
|
|
103892
104024
|
try {
|
|
103893
|
-
|
|
104025
|
+
import_node_fs104.default.renameSync(directory2, retired);
|
|
103894
104026
|
} catch (error) {
|
|
103895
104027
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
|
|
103896
104028
|
throw error;
|
|
@@ -103901,15 +104033,15 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
103901
104033
|
false
|
|
103902
104034
|
);
|
|
103903
104035
|
const complete = [];
|
|
103904
|
-
for (const name3 of
|
|
103905
|
-
const directory2 =
|
|
104036
|
+
for (const name3 of import_node_fs104.default.readdirSync(parent)) {
|
|
104037
|
+
const directory2 = import_node_path106.default.join(parent, name3);
|
|
103906
104038
|
if (name3.startsWith(RETIRED_PREFIX2)) {
|
|
103907
104039
|
reapRetiredCacheDirectory(parent, name3);
|
|
103908
104040
|
continue;
|
|
103909
104041
|
}
|
|
103910
|
-
const used =
|
|
104042
|
+
const used = import_node_fs104.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
|
|
103911
104043
|
if (directory2 === keep || used === void 0) continue;
|
|
103912
|
-
if (
|
|
104044
|
+
if (import_node_fs104.default.existsSync(import_node_path106.default.join(directory2, ".peach-complete")) || import_node_fs104.default.existsSync(import_node_path106.default.join(directory2, ".peach-project-complete")))
|
|
103913
104045
|
complete.push({ directory: directory2, used });
|
|
103914
104046
|
else if (Date.now() - used > ABANDONED_WORKSPACE_MS) await retire(directory2, used);
|
|
103915
104047
|
}
|
|
@@ -103918,38 +104050,38 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
103918
104050
|
}
|
|
103919
104051
|
function syncChangedFiles(root, work, appRelative, excluded, installed2) {
|
|
103920
104052
|
const copyIfNewer = (file, relative7, newerOnly) => {
|
|
103921
|
-
const source =
|
|
103922
|
-
const target =
|
|
103923
|
-
const existing =
|
|
104053
|
+
const source = import_node_fs104.default.statSync(file);
|
|
104054
|
+
const target = import_node_path106.default.join(work, relative7);
|
|
104055
|
+
const existing = import_node_fs104.default.statSync(target, { throwIfNoEntry: false });
|
|
103924
104056
|
if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
|
|
103925
104057
|
return;
|
|
103926
|
-
|
|
104058
|
+
import_node_fs104.default.mkdirSync(import_node_path106.default.dirname(target), { recursive: true });
|
|
103927
104059
|
const staged = `${target}.${process.pid}.peach-sync`;
|
|
103928
|
-
|
|
103929
|
-
|
|
103930
|
-
|
|
104060
|
+
import_node_fs104.default.copyFileSync(file, staged);
|
|
104061
|
+
import_node_fs104.default.utimesSync(staged, source.atime, source.mtime);
|
|
104062
|
+
import_node_fs104.default.renameSync(staged, target);
|
|
103931
104063
|
};
|
|
103932
104064
|
const walkInstalled = (directory2) => {
|
|
103933
|
-
for (const entry of
|
|
103934
|
-
const file =
|
|
104065
|
+
for (const entry of import_node_fs104.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
104066
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
103935
104067
|
if (entry.isDirectory()) walkInstalled(file);
|
|
103936
|
-
else if (entry.isFile()) copyIfNewer(file,
|
|
104068
|
+
else if (entry.isFile()) copyIfNewer(file, import_node_path106.default.relative(root, file), true);
|
|
103937
104069
|
}
|
|
103938
104070
|
};
|
|
103939
|
-
const sourceIos =
|
|
104071
|
+
const sourceIos = import_node_fs104.default.existsSync(import_node_path106.default.join(root, appRelative, "ios", "Podfile"));
|
|
103940
104072
|
const walk4 = (directory2) => {
|
|
103941
|
-
for (const entry of
|
|
103942
|
-
const file =
|
|
103943
|
-
const relative7 =
|
|
103944
|
-
if (installed2 && entry.name === "node_modules" && entry.isDirectory() &&
|
|
104073
|
+
for (const entry of import_node_fs104.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
104074
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
104075
|
+
const relative7 = import_node_path106.default.relative(root, file);
|
|
104076
|
+
if (installed2 && entry.name === "node_modules" && entry.isDirectory() && import_node_fs104.default.existsSync(import_node_path106.default.join(work, relative7))) {
|
|
103945
104077
|
walkInstalled(file);
|
|
103946
104078
|
continue;
|
|
103947
104079
|
}
|
|
103948
|
-
if (excluded(relative7, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative7 ===
|
|
104080
|
+
if (excluded(relative7, entry.isDirectory()) || entry.isSymbolicLink() || !sourceIos && relative7 === import_node_path106.default.join(appRelative, "ios"))
|
|
103949
104081
|
continue;
|
|
103950
104082
|
if (entry.isDirectory()) walk4(file);
|
|
103951
104083
|
else if (entry.isFile()) {
|
|
103952
|
-
if (NATIVE_CONFIG_FILE.test(relative7.split(
|
|
104084
|
+
if (NATIVE_CONFIG_FILE.test(relative7.split(import_node_path106.default.sep).join("/"))) continue;
|
|
103953
104085
|
copyIfNewer(file, relative7, false);
|
|
103954
104086
|
}
|
|
103955
104087
|
}
|
|
@@ -103960,10 +104092,10 @@ function watchRoot(root) {
|
|
|
103960
104092
|
const existing = watches.get(root);
|
|
103961
104093
|
if (existing) return existing;
|
|
103962
104094
|
const watch4 = { edits: 0 };
|
|
103963
|
-
const watcher =
|
|
103964
|
-
const parts2 = filename?.split(
|
|
104095
|
+
const watcher = import_node_fs104.default.watch(root, { recursive: true }, (_event, filename) => {
|
|
104096
|
+
const parts2 = filename?.split(import_node_path106.default.sep) ?? [];
|
|
103965
104097
|
const { excluded } = watch4;
|
|
103966
|
-
if (excluded && parts2.some((_, index) => excluded(parts2.slice(0, index + 1).join(
|
|
104098
|
+
if (excluded && parts2.some((_, index) => excluded(parts2.slice(0, index + 1).join(import_node_path106.default.sep))))
|
|
103967
104099
|
return;
|
|
103968
104100
|
if (filename && watch4.ignoredLater?.(filename)) return;
|
|
103969
104101
|
watch4.edits += 1;
|
|
@@ -103979,8 +104111,8 @@ function watchRoot(root) {
|
|
|
103979
104111
|
}
|
|
103980
104112
|
async function prepareExpoNativeWorkspace(app, signal, target) {
|
|
103981
104113
|
const prepared = await prepare2(app, "workspace", signal);
|
|
103982
|
-
const ios =
|
|
103983
|
-
const workspaces =
|
|
104114
|
+
const ios = import_node_path106.default.join(prepared.app, "ios");
|
|
104115
|
+
const workspaces = import_node_fs104.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"));
|
|
103984
104116
|
const workspace = selectXcodeWorkspace(ios, workspaces);
|
|
103985
104117
|
if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`);
|
|
103986
104118
|
await resolveXcodeSwiftPackages(workspace, signal, target);
|
|
@@ -103997,13 +104129,13 @@ function prepareExpoNativeProject(app, signal, dependencies = "lockfile") {
|
|
|
103997
104129
|
);
|
|
103998
104130
|
}
|
|
103999
104131
|
function prepare2(app, stage, signal) {
|
|
104000
|
-
app =
|
|
104132
|
+
app = import_node_fs104.default.realpathSync(app);
|
|
104001
104133
|
const podsEnvironment = reactNativePodsEnvironment();
|
|
104002
104134
|
const key2 = `${app}\0${stage}\0${JSON.stringify(podsEnvironment)}`;
|
|
104003
104135
|
const last = current.get(key2);
|
|
104004
|
-
if (last && last.watch.edits === last.edits && (
|
|
104136
|
+
if (last && last.watch.edits === last.edits && (import_node_fs104.default.existsSync(import_node_path106.default.join(last.result.work, ".peach-complete")) || stage !== "workspace" && import_node_fs104.default.existsSync(import_node_path106.default.join(last.result.work, ".peach-project-complete")))) {
|
|
104005
104137
|
const now = /* @__PURE__ */ new Date();
|
|
104006
|
-
|
|
104138
|
+
import_node_fs104.default.utimesSync(last.result.work, now, now);
|
|
104007
104139
|
return Promise.resolve(last.result);
|
|
104008
104140
|
}
|
|
104009
104141
|
let shared = preparing.get(key2);
|
|
@@ -104026,25 +104158,25 @@ function prepare2(app, stage, signal) {
|
|
|
104026
104158
|
}
|
|
104027
104159
|
async function copyInstalledWorkspace(root, destination, excluded) {
|
|
104028
104160
|
const installed2 = [];
|
|
104029
|
-
await
|
|
104161
|
+
await import_node_fs104.default.promises.cp(root, destination, {
|
|
104030
104162
|
recursive: true,
|
|
104031
|
-
mode:
|
|
104163
|
+
mode: import_node_fs104.default.constants.COPYFILE_FICLONE,
|
|
104032
104164
|
preserveTimestamps: true,
|
|
104033
104165
|
verbatimSymlinks: true,
|
|
104034
104166
|
filter: (source) => {
|
|
104035
|
-
const relative7 =
|
|
104036
|
-
if (
|
|
104167
|
+
const relative7 = import_node_path106.default.relative(root, source);
|
|
104168
|
+
if (import_node_path106.default.basename(source) === "node_modules") installed2.push(relative7);
|
|
104037
104169
|
return !excluded(relative7);
|
|
104038
104170
|
}
|
|
104039
104171
|
});
|
|
104040
104172
|
const entries2 = installed2.flatMap((relative7) => {
|
|
104041
|
-
const source =
|
|
104042
|
-
if (
|
|
104043
|
-
|
|
104173
|
+
const source = import_node_path106.default.join(root, relative7);
|
|
104174
|
+
if (import_node_fs104.default.lstatSync(source).isSymbolicLink()) {
|
|
104175
|
+
import_node_fs104.default.symlinkSync(import_node_fs104.default.readlinkSync(source), import_node_path106.default.join(destination, relative7));
|
|
104044
104176
|
return [];
|
|
104045
104177
|
}
|
|
104046
|
-
|
|
104047
|
-
return
|
|
104178
|
+
import_node_fs104.default.mkdirSync(import_node_path106.default.join(destination, relative7));
|
|
104179
|
+
return import_node_fs104.default.readdirSync(source).filter((name3) => name3 !== ".cache").map((name3) => import_node_path106.default.join(relative7, name3));
|
|
104048
104180
|
});
|
|
104049
104181
|
if (process.platform === "darwin") {
|
|
104050
104182
|
await new Promise((resolve16, reject) => {
|
|
@@ -104056,8 +104188,8 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
104056
104188
|
);
|
|
104057
104189
|
child.stdin?.end(
|
|
104058
104190
|
entries2.flatMap((relative7) => [
|
|
104059
|
-
|
|
104060
|
-
|
|
104191
|
+
import_node_path106.default.join(root, relative7),
|
|
104192
|
+
import_node_path106.default.join(destination, relative7)
|
|
104061
104193
|
]).join("\0")
|
|
104062
104194
|
);
|
|
104063
104195
|
});
|
|
@@ -104070,32 +104202,32 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
104070
104202
|
"-R",
|
|
104071
104203
|
"-p",
|
|
104072
104204
|
"--reflink=auto",
|
|
104073
|
-
|
|
104074
|
-
|
|
104205
|
+
import_node_path106.default.join(root, relative7),
|
|
104206
|
+
import_node_path106.default.join(destination, relative7)
|
|
104075
104207
|
]);
|
|
104076
104208
|
return clone();
|
|
104077
104209
|
};
|
|
104078
104210
|
await Promise.all(Array.from({ length: 8 }, clone));
|
|
104079
104211
|
}
|
|
104080
104212
|
function nativeWorkspacesDir(root) {
|
|
104081
|
-
const device =
|
|
104213
|
+
const device = import_node_fs104.default.statSync(root).dev;
|
|
104082
104214
|
for (const cache of [
|
|
104083
104215
|
sharedCacheDir(cacheDir()),
|
|
104084
104216
|
cacheDir(),
|
|
104085
|
-
|
|
104217
|
+
import_node_path106.default.join(import_node_os21.default.homedir(), ".peach-cache")
|
|
104086
104218
|
]) {
|
|
104087
104219
|
let existing = cache;
|
|
104088
|
-
while (!
|
|
104089
|
-
if (
|
|
104090
|
-
return
|
|
104091
|
-
}
|
|
104092
|
-
let mount =
|
|
104093
|
-
while (
|
|
104094
|
-
mount =
|
|
104095
|
-
const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp",
|
|
104220
|
+
while (!import_node_fs104.default.existsSync(existing)) existing = import_node_path106.default.dirname(existing);
|
|
104221
|
+
if (import_node_fs104.default.statSync(existing).dev === device)
|
|
104222
|
+
return import_node_path106.default.join(cache, "expo-native-workspaces");
|
|
104223
|
+
}
|
|
104224
|
+
let mount = import_node_fs104.default.realpathSync(root);
|
|
104225
|
+
while (import_node_path106.default.dirname(mount) !== mount && import_node_fs104.default.statSync(import_node_path106.default.dirname(mount)).dev === device)
|
|
104226
|
+
mount = import_node_path106.default.dirname(mount);
|
|
104227
|
+
const tmpRoots = /* @__PURE__ */ new Set(["/tmp", "/var/tmp", import_node_fs104.default.realpathSync(import_node_os21.default.tmpdir())]);
|
|
104096
104228
|
if (tmpRoots.has(mount))
|
|
104097
|
-
return
|
|
104098
|
-
return
|
|
104229
|
+
return import_node_path106.default.join(sharedCacheDir(cacheDir()), "expo-native-workspaces");
|
|
104230
|
+
return import_node_path106.default.join(mount, ".peach-cache", "expo-native-workspaces");
|
|
104099
104231
|
}
|
|
104100
104232
|
function preparedExpoWorkspacesDir(app) {
|
|
104101
104233
|
return nativeWorkspacesDir(findWorkspaceRoot(app));
|
|
@@ -104109,7 +104241,7 @@ function trackedSourceEntries(root, work) {
|
|
|
104109
104241
|
if (listed.status !== 0) return [];
|
|
104110
104242
|
return listed.stdout.toString("utf8").split("\0").filter((entry) => {
|
|
104111
104243
|
const tab = entry.indexOf(" ");
|
|
104112
|
-
return tab > 0 &&
|
|
104244
|
+
return tab > 0 && import_node_fs104.default.existsSync(import_node_path106.default.join(work, entry.slice(tab + 1)));
|
|
104113
104245
|
});
|
|
104114
104246
|
}
|
|
104115
104247
|
function initializeWorkspaceGit(root, work) {
|
|
@@ -104158,42 +104290,42 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104158
104290
|
);
|
|
104159
104291
|
watch4.excluded = excluded;
|
|
104160
104292
|
watch4.ignoredLater = await untrackedIgnored(root, linkedPackageDirectories(root, app));
|
|
104161
|
-
const manifest = JSON.parse(
|
|
104162
|
-
const appManifest = JSON.parse(
|
|
104163
|
-
const work =
|
|
104293
|
+
const manifest = JSON.parse(import_node_fs104.default.readFileSync(import_node_path106.default.join(root, "package.json"), "utf8"));
|
|
104294
|
+
const appManifest = JSON.parse(import_node_fs104.default.readFileSync(import_node_path106.default.join(app, "package.json"), "utf8"));
|
|
104295
|
+
const work = import_node_path106.default.join(
|
|
104164
104296
|
nativeWorkspacesDir(root),
|
|
104165
104297
|
stage === "installed-project" ? `${nativeHash}-installed` : nativeHash
|
|
104166
104298
|
);
|
|
104167
104299
|
report(`hashed ${root}`);
|
|
104168
104300
|
const result = await withSwiftRootLock(work, async (lease) => {
|
|
104169
|
-
const marker =
|
|
104170
|
-
const projectMarker =
|
|
104171
|
-
const preparedApp =
|
|
104172
|
-
const projectReady =
|
|
104301
|
+
const marker = import_node_path106.default.join(work, ".peach-complete");
|
|
104302
|
+
const projectMarker = import_node_path106.default.join(work, ".peach-project-complete");
|
|
104303
|
+
const preparedApp = import_node_path106.default.join(work, appRelative);
|
|
104304
|
+
const projectReady = import_node_fs104.default.existsSync(marker) || import_node_fs104.default.existsSync(projectMarker);
|
|
104173
104305
|
if (projectReady) {
|
|
104174
104306
|
syncChangedFiles(
|
|
104175
104307
|
root,
|
|
104176
104308
|
work,
|
|
104177
104309
|
appRelative,
|
|
104178
104310
|
excluded,
|
|
104179
|
-
stage === "workspace" && !
|
|
104311
|
+
stage === "workspace" && !import_node_fs104.default.existsSync(marker)
|
|
104180
104312
|
);
|
|
104181
104313
|
report(`reusing prepared workspace ${work}`);
|
|
104182
104314
|
}
|
|
104183
104315
|
if (!projectReady) {
|
|
104184
104316
|
const partial = `${work}.${process.pid}.partial`;
|
|
104185
|
-
await
|
|
104186
|
-
await
|
|
104187
|
-
|
|
104317
|
+
await import_node_fs104.default.promises.rm(partial, { recursive: true, force: true });
|
|
104318
|
+
await import_node_fs104.default.promises.rm(work, { recursive: true, force: true });
|
|
104319
|
+
import_node_fs104.default.mkdirSync(import_node_path106.default.dirname(work), { recursive: true });
|
|
104188
104320
|
report("copying workspace");
|
|
104189
104321
|
await copyInstalledWorkspace(root, partial, excluded);
|
|
104190
|
-
|
|
104322
|
+
import_node_fs104.default.renameSync(partial, work);
|
|
104191
104323
|
initializeWorkspaceGit(root, work);
|
|
104192
104324
|
report("copied workspace");
|
|
104193
104325
|
}
|
|
104194
|
-
if (projectReady && (stage !== "workspace" ||
|
|
104326
|
+
if (projectReady && (stage !== "workspace" || import_node_fs104.default.existsSync(marker))) {
|
|
104195
104327
|
const now2 = /* @__PURE__ */ new Date();
|
|
104196
|
-
|
|
104328
|
+
import_node_fs104.default.utimesSync(work, now2, now2);
|
|
104197
104329
|
return { app: preparedApp, work };
|
|
104198
104330
|
}
|
|
104199
104331
|
const trustedConfigs = /* @__PURE__ */ new Set();
|
|
@@ -104205,10 +104337,10 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104205
104337
|
if (result2.status !== 0) continue;
|
|
104206
104338
|
const configs = JSON.parse(result2.stdout);
|
|
104207
104339
|
for (const config of configs) {
|
|
104208
|
-
const relative7 =
|
|
104209
|
-
if (relative7.startsWith("..") ||
|
|
104210
|
-
const copy =
|
|
104211
|
-
if (
|
|
104340
|
+
const relative7 = import_node_path106.default.relative(root, config.path);
|
|
104341
|
+
if (relative7.startsWith("..") || import_node_path106.default.isAbsolute(relative7)) continue;
|
|
104342
|
+
const copy = import_node_path106.default.join(work, relative7);
|
|
104343
|
+
if (import_node_fs104.default.existsSync(copy) && import_node_fs104.default.readFileSync(config.path).equals(import_node_fs104.default.readFileSync(copy)))
|
|
104212
104344
|
trustedConfigs.add(copy);
|
|
104213
104345
|
}
|
|
104214
104346
|
}
|
|
@@ -104216,7 +104348,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104216
104348
|
MISE_TRUSTED_CONFIG_PATHS: [
|
|
104217
104349
|
process.env.MISE_TRUSTED_CONFIG_PATHS,
|
|
104218
104350
|
...trustedConfigs
|
|
104219
|
-
].filter(Boolean).join(
|
|
104351
|
+
].filter(Boolean).join(import_node_path106.default.delimiter)
|
|
104220
104352
|
};
|
|
104221
104353
|
const run18 = (command, args, cwd, env = {}, admit = true) => {
|
|
104222
104354
|
const admitted = admit && teamMachineInstalled();
|
|
@@ -104234,8 +104366,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104234
104366
|
const nodeVersion = pinnedNodeVersion(root, manifest);
|
|
104235
104367
|
const pinnedBun = manager.startsWith("bun@");
|
|
104236
104368
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, ...pinnedBun ? [manager] : [], "--"] : [];
|
|
104237
|
-
const bunPrefix =
|
|
104238
|
-
const bunExecutable =
|
|
104369
|
+
const bunPrefix = import_node_path106.default.join(cacheDir(), "package-managers", manager);
|
|
104370
|
+
const bunExecutable = import_node_path106.default.join(bunPrefix, "node_modules/.bin/bun");
|
|
104239
104371
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
104240
104372
|
"npx",
|
|
104241
104373
|
"--yes",
|
|
@@ -104250,7 +104382,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104250
104382
|
);
|
|
104251
104383
|
const installEnv = {
|
|
104252
104384
|
npm_config_ignore_scripts: "false",
|
|
104253
|
-
...pinnedBun && !nodeVersion ? { PATH: [
|
|
104385
|
+
...pinnedBun && !nodeVersion ? { PATH: [import_node_path106.default.dirname(bunExecutable), process.env.PATH].join(import_node_path106.default.delimiter) } : {}
|
|
104254
104386
|
};
|
|
104255
104387
|
const execute = async (args, cwd, env = {}) => {
|
|
104256
104388
|
const command = [...prefix, ...args];
|
|
@@ -104276,7 +104408,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104276
104408
|
);
|
|
104277
104409
|
}
|
|
104278
104410
|
}
|
|
104279
|
-
if (install[0] === "npm" &&
|
|
104411
|
+
if (install[0] === "npm" && import_node_fs104.default.existsSync(import_node_path106.default.join(work, "package-lock.json"))) {
|
|
104280
104412
|
report("checking npm lockfile");
|
|
104281
104413
|
const check2 = [
|
|
104282
104414
|
...prefix,
|
|
@@ -104304,9 +104436,9 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104304
104436
|
report,
|
|
104305
104437
|
oneSdkPrepared
|
|
104306
104438
|
);
|
|
104307
|
-
|
|
104439
|
+
import_node_fs104.default.writeFileSync(projectMarker, "complete\n");
|
|
104308
104440
|
}
|
|
104309
|
-
if (stage === "workspace" && !
|
|
104441
|
+
if (stage === "workspace" && !import_node_fs104.default.existsSync(marker)) {
|
|
104310
104442
|
await prepareNativeProject(
|
|
104311
104443
|
preparedApp,
|
|
104312
104444
|
work,
|
|
@@ -104316,14 +104448,14 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104316
104448
|
report,
|
|
104317
104449
|
oneSdkPrepared
|
|
104318
104450
|
);
|
|
104319
|
-
|
|
104451
|
+
import_node_fs104.default.writeFileSync(marker, "complete\n");
|
|
104320
104452
|
}
|
|
104321
104453
|
const now = /* @__PURE__ */ new Date();
|
|
104322
|
-
|
|
104454
|
+
import_node_fs104.default.utimesSync(work, now, now);
|
|
104323
104455
|
return { app: preparedApp, work };
|
|
104324
104456
|
});
|
|
104325
104457
|
if (stage === "workspace") readInstalledPodspecs(app, result.app);
|
|
104326
|
-
await pruneExpoNativeWorkspaces(
|
|
104458
|
+
await pruneExpoNativeWorkspaces(import_node_path106.default.dirname(work), work);
|
|
104327
104459
|
current.set(key2, { watch: watch4, edits, result });
|
|
104328
104460
|
return result;
|
|
104329
104461
|
}
|
|
@@ -104331,20 +104463,20 @@ function declaresNativeDependency(manifest, name3) {
|
|
|
104331
104463
|
return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
|
|
104332
104464
|
}
|
|
104333
104465
|
async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
|
|
104334
|
-
const appRequire = (0, import_node_module10.createRequire)(
|
|
104466
|
+
const appRequire = (0, import_node_module10.createRequire)(import_node_path106.default.join(app, "package.json"));
|
|
104335
104467
|
const sourcePodEnv = {
|
|
104336
104468
|
EXPO_USE_PRECOMPILED_MODULES: "0",
|
|
104337
104469
|
ONE_PREBUILT_IOS: "0",
|
|
104338
104470
|
RCT_NEW_ARCH_ENABLED: process.env.RCT_NEW_ARCH_ENABLED ?? "1"
|
|
104339
104471
|
};
|
|
104340
104472
|
const declares2 = (name3) => declaresNativeDependency(manifest, name3);
|
|
104341
|
-
if (!
|
|
104473
|
+
if (!import_node_fs104.default.existsSync(import_node_path106.default.join(app, "ios", "Podfile"))) {
|
|
104342
104474
|
if (!declares2("expo") && !declares2("one"))
|
|
104343
104475
|
throw new Error(
|
|
104344
104476
|
`${app} has no ios/Podfile and declares neither expo nor one, so peach cannot generate an iOS project for it`
|
|
104345
104477
|
);
|
|
104346
104478
|
const prebuild = declares2("expo") ? [appRequire.resolve("expo/bin/cli"), "prebuild"] : [
|
|
104347
|
-
|
|
104479
|
+
import_node_path106.default.join(import_node_path106.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
|
|
104348
104480
|
"prebuild"
|
|
104349
104481
|
];
|
|
104350
104482
|
await execute(
|
|
@@ -104380,25 +104512,25 @@ async function prepareNativeProject(app, workspace, manifest, stage, execute, re
|
|
|
104380
104512
|
function stageCachedQuickCryptoOpenSsl(app) {
|
|
104381
104513
|
const root = findWorkspaceRoot(app);
|
|
104382
104514
|
let packageDir = null;
|
|
104383
|
-
for (let at = app; ; at =
|
|
104384
|
-
const candidate =
|
|
104385
|
-
if (
|
|
104515
|
+
for (let at = app; ; at = import_node_path106.default.dirname(at)) {
|
|
104516
|
+
const candidate = import_node_path106.default.join(at, "node_modules", "react-native-quick-crypto");
|
|
104517
|
+
if (import_node_fs104.default.existsSync(import_node_path106.default.join(candidate, "QuickCrypto.podspec"))) {
|
|
104386
104518
|
packageDir = candidate;
|
|
104387
104519
|
break;
|
|
104388
104520
|
}
|
|
104389
|
-
if (at === root ||
|
|
104521
|
+
if (at === root || import_node_path106.default.dirname(at) === at) break;
|
|
104390
104522
|
}
|
|
104391
104523
|
if (!packageDir) return;
|
|
104392
|
-
const opensslDir =
|
|
104393
|
-
if (
|
|
104394
|
-
const podspec =
|
|
104524
|
+
const opensslDir = import_node_path106.default.join(packageDir, "ios", "openssl");
|
|
104525
|
+
if (import_node_fs104.default.existsSync(import_node_path106.default.join(opensslDir, "quickcrypto_openssl_prefix.h"))) return;
|
|
104526
|
+
const podspec = import_node_fs104.default.readFileSync(import_node_path106.default.join(packageDir, "QuickCrypto.podspec"), "utf8");
|
|
104395
104527
|
const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
|
|
104396
104528
|
if (!sha2565) return;
|
|
104397
|
-
const archive =
|
|
104398
|
-
if (!
|
|
104529
|
+
const archive = import_node_path106.default.join(cacheDir(), "pod-archives", `${sha2565}.zip`);
|
|
104530
|
+
if (!import_node_fs104.default.existsSync(archive) || (0, import_node_crypto62.createHash)("sha256").update(import_node_fs104.default.readFileSync(archive)).digest("hex") !== sha2565)
|
|
104399
104531
|
return;
|
|
104400
|
-
|
|
104401
|
-
|
|
104532
|
+
import_node_fs104.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
104533
|
+
import_node_fs104.default.mkdirSync(opensslDir, { recursive: true });
|
|
104402
104534
|
(0, import_node_child_process50.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
|
|
104403
104535
|
}
|
|
104404
104536
|
async function runAdmitted(lease, command, args, cwd, extraEnv, admitted) {
|
|
@@ -104433,16 +104565,16 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
104433
104565
|
});
|
|
104434
104566
|
});
|
|
104435
104567
|
}
|
|
104436
|
-
var import_node_child_process50, import_node_crypto62,
|
|
104568
|
+
var import_node_child_process50, import_node_crypto62, import_node_fs104, 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;
|
|
104437
104569
|
var init_expo_native_workspace = __esm({
|
|
104438
104570
|
"src/expo-native-workspace.ts"() {
|
|
104439
104571
|
"use strict";
|
|
104440
104572
|
import_node_child_process50 = require("node:child_process");
|
|
104441
104573
|
import_node_crypto62 = require("node:crypto");
|
|
104442
|
-
|
|
104574
|
+
import_node_fs104 = __toESM(require("node:fs"), 1);
|
|
104443
104575
|
import_node_module10 = require("node:module");
|
|
104444
104576
|
import_node_os21 = __toESM(require("node:os"), 1);
|
|
104445
|
-
|
|
104577
|
+
import_node_path106 = __toESM(require("node:path"), 1);
|
|
104446
104578
|
import_node_util13 = require("node:util");
|
|
104447
104579
|
init_detect();
|
|
104448
104580
|
init_admitted_mac_build();
|
|
@@ -104530,7 +104662,7 @@ async function expoDiscoveryKey(options2) {
|
|
|
104530
104662
|
return { key: key2, root };
|
|
104531
104663
|
}
|
|
104532
104664
|
function expoDiscoveryCacheDir() {
|
|
104533
|
-
return
|
|
104665
|
+
return import_node_path107.default.join(sharedCacheDir(import_node_path107.default.join(ambientHomeDir(), "cache")), "expo-discovery");
|
|
104534
104666
|
}
|
|
104535
104667
|
function vanished2(error) {
|
|
104536
104668
|
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
@@ -104538,25 +104670,25 @@ function vanished2(error) {
|
|
|
104538
104670
|
function renew(file) {
|
|
104539
104671
|
const now = /* @__PURE__ */ new Date();
|
|
104540
104672
|
try {
|
|
104541
|
-
|
|
104673
|
+
import_node_fs105.default.utimesSync(file, now, now);
|
|
104542
104674
|
} catch (error) {
|
|
104543
104675
|
if (!vanished2(error)) throw error;
|
|
104544
104676
|
}
|
|
104545
104677
|
}
|
|
104546
104678
|
function expireDiscovery(dir, keep) {
|
|
104547
104679
|
const sweep = (parent, expiry) => {
|
|
104548
|
-
if (!
|
|
104549
|
-
for (const name3 of
|
|
104680
|
+
if (!import_node_fs105.default.existsSync(parent)) return;
|
|
104681
|
+
for (const name3 of import_node_fs105.default.readdirSync(parent)) {
|
|
104550
104682
|
if (!expiry(name3)) continue;
|
|
104551
|
-
const file =
|
|
104552
|
-
const modified =
|
|
104683
|
+
const file = import_node_path107.default.join(parent, name3);
|
|
104684
|
+
const modified = import_node_fs105.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
|
|
104553
104685
|
if (modified === void 0 || file === keep) continue;
|
|
104554
104686
|
const limit = name3.endsWith(".tmp") ? ORPHAN_TEMPORARY_MS : EXPIRY_MS;
|
|
104555
|
-
if (Date.now() - modified > limit)
|
|
104687
|
+
if (Date.now() - modified > limit) import_node_fs105.default.rmSync(file, { force: true });
|
|
104556
104688
|
}
|
|
104557
104689
|
};
|
|
104558
104690
|
sweep(dir, (name3) => name3.endsWith(".json") || name3.endsWith(".tmp"));
|
|
104559
|
-
sweep(
|
|
104691
|
+
sweep(import_node_path107.default.join(dir, "blobs"), () => true);
|
|
104560
104692
|
}
|
|
104561
104693
|
function isExpoSwiftSourceUnit(value) {
|
|
104562
104694
|
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");
|
|
@@ -104566,9 +104698,9 @@ function isStoredUnit(value) {
|
|
|
104566
104698
|
}
|
|
104567
104699
|
function readExpoDiscovery(key2) {
|
|
104568
104700
|
let parsed2;
|
|
104569
|
-
const record6 =
|
|
104701
|
+
const record6 = import_node_path107.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
|
|
104570
104702
|
try {
|
|
104571
|
-
parsed2 = JSON.parse(
|
|
104703
|
+
parsed2 = JSON.parse(import_node_fs105.default.readFileSync(record6, "utf8"));
|
|
104572
104704
|
} catch {
|
|
104573
104705
|
return void 0;
|
|
104574
104706
|
}
|
|
@@ -104595,8 +104727,8 @@ function readExpoDiscovery(key2) {
|
|
|
104595
104727
|
if (!Array.isArray(parsed2.units) || !parsed2.units.every(isBodyOffset))
|
|
104596
104728
|
return void 0;
|
|
104597
104729
|
if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
|
|
104598
|
-
const archive =
|
|
104599
|
-
const bytes =
|
|
104730
|
+
const archive = import_node_path107.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
|
|
104731
|
+
const bytes = import_node_fs105.default.readFileSync(archive);
|
|
104600
104732
|
if ((0, import_node_crypto63.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
|
|
104601
104733
|
return void 0;
|
|
104602
104734
|
const bodies = (0, import_node_zlib7.zstdDecompressSync)(bytes);
|
|
@@ -104651,13 +104783,13 @@ function readExpoDiscovery(key2) {
|
|
|
104651
104783
|
}
|
|
104652
104784
|
}
|
|
104653
104785
|
function fileHashesPath() {
|
|
104654
|
-
return
|
|
104786
|
+
return import_node_path107.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
|
|
104655
104787
|
}
|
|
104656
104788
|
function stampedFileHash(file) {
|
|
104657
104789
|
if (!fileHashesLoaded) {
|
|
104658
104790
|
fileHashesLoaded = true;
|
|
104659
104791
|
try {
|
|
104660
|
-
const saved = JSON.parse(
|
|
104792
|
+
const saved = JSON.parse(import_node_fs105.default.readFileSync(fileHashesPath(), "utf8"));
|
|
104661
104793
|
if (isRecord(saved)) {
|
|
104662
104794
|
for (const [entry, value] of Object.entries(saved))
|
|
104663
104795
|
if (Array.isArray(value) && typeof value[0] === "string" && typeof value[1] === "string")
|
|
@@ -104667,11 +104799,11 @@ function stampedFileHash(file) {
|
|
|
104667
104799
|
fileHashes.clear();
|
|
104668
104800
|
}
|
|
104669
104801
|
}
|
|
104670
|
-
const stat2 =
|
|
104802
|
+
const stat2 = import_node_fs105.default.statSync(file, { bigint: true });
|
|
104671
104803
|
const stamp = [stat2.dev, stat2.ino, stat2.size, stat2.mtimeNs, stat2.ctimeNs].join(":");
|
|
104672
104804
|
const cached5 = fileHashes.get(file);
|
|
104673
104805
|
if (cached5?.stamp === stamp) return cached5.checksum;
|
|
104674
|
-
const checksum = (0, import_node_crypto63.createHash)("sha256").update(
|
|
104806
|
+
const checksum = (0, import_node_crypto63.createHash)("sha256").update(import_node_fs105.default.readFileSync(file)).digest("hex");
|
|
104675
104807
|
fileHashes.set(file, { stamp, checksum });
|
|
104676
104808
|
fileHashesChanged = true;
|
|
104677
104809
|
return checksum;
|
|
@@ -104682,18 +104814,18 @@ function saveFileHashes() {
|
|
|
104682
104814
|
const target = fileHashesPath();
|
|
104683
104815
|
const temporary = `${target}.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`;
|
|
104684
104816
|
try {
|
|
104685
|
-
|
|
104686
|
-
|
|
104817
|
+
import_node_fs105.default.mkdirSync(import_node_path107.default.dirname(target), { recursive: true });
|
|
104818
|
+
import_node_fs105.default.writeFileSync(
|
|
104687
104819
|
temporary,
|
|
104688
104820
|
JSON.stringify(
|
|
104689
104821
|
Object.fromEntries(
|
|
104690
|
-
[...fileHashes].filter(([entry]) =>
|
|
104822
|
+
[...fileHashes].filter(([entry]) => import_node_fs105.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
|
|
104691
104823
|
)
|
|
104692
104824
|
)
|
|
104693
104825
|
);
|
|
104694
|
-
|
|
104826
|
+
import_node_fs105.default.renameSync(temporary, target);
|
|
104695
104827
|
} catch {
|
|
104696
|
-
|
|
104828
|
+
import_node_fs105.default.rmSync(temporary, { force: true });
|
|
104697
104829
|
}
|
|
104698
104830
|
}
|
|
104699
104831
|
function treeDigest(directory2, signal) {
|
|
@@ -104701,14 +104833,14 @@ function treeDigest(directory2, signal) {
|
|
|
104701
104833
|
const seen = /* @__PURE__ */ new Set();
|
|
104702
104834
|
const walk4 = (dir) => {
|
|
104703
104835
|
signal?.throwIfAborted();
|
|
104704
|
-
const canonical =
|
|
104836
|
+
const canonical = import_node_fs105.default.realpathSync(dir);
|
|
104705
104837
|
if (seen.has(canonical)) return;
|
|
104706
104838
|
seen.add(canonical);
|
|
104707
|
-
for (const child of
|
|
104708
|
-
const file =
|
|
104709
|
-
const relative7 =
|
|
104839
|
+
for (const child of import_node_fs105.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
|
|
104840
|
+
const file = import_node_path107.default.join(dir, child.name);
|
|
104841
|
+
const relative7 = import_node_path107.default.relative(directory2, file);
|
|
104710
104842
|
if (child.isSymbolicLink()) {
|
|
104711
|
-
entries2.set(relative7, `link\0${
|
|
104843
|
+
entries2.set(relative7, `link\0${import_node_fs105.default.readlinkSync(file)}`);
|
|
104712
104844
|
} else if (child.isDirectory()) {
|
|
104713
104845
|
walk4(file);
|
|
104714
104846
|
} else if (child.isFile()) {
|
|
@@ -104722,7 +104854,7 @@ function treeDigest(directory2, signal) {
|
|
|
104722
104854
|
function frameworkDigest(directory2, signal) {
|
|
104723
104855
|
let root;
|
|
104724
104856
|
try {
|
|
104725
|
-
root =
|
|
104857
|
+
root = import_node_fs105.default.realpathSync(directory2);
|
|
104726
104858
|
} catch (error) {
|
|
104727
104859
|
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
|
|
104728
104860
|
return MISSING_TREE;
|
|
@@ -104731,8 +104863,8 @@ function frameworkDigest(directory2, signal) {
|
|
|
104731
104863
|
const entries2 = treeDigest(directory2, signal);
|
|
104732
104864
|
for (const [relative7, value] of entries2) {
|
|
104733
104865
|
if (!value.startsWith("link\0")) continue;
|
|
104734
|
-
const target =
|
|
104735
|
-
if (target !== root && !target.startsWith(`${root}${
|
|
104866
|
+
const target = import_node_fs105.default.realpathSync(import_node_path107.default.join(directory2, relative7));
|
|
104867
|
+
if (target !== root && !target.startsWith(`${root}${import_node_path107.default.sep}`))
|
|
104736
104868
|
throw new Error(`framework link escapes its tree: ${relative7}`);
|
|
104737
104869
|
}
|
|
104738
104870
|
return (0, import_node_crypto63.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
|
|
@@ -104750,8 +104882,8 @@ function rewritePreparedPaths(options2) {
|
|
|
104750
104882
|
let preparedBytes;
|
|
104751
104883
|
let sourceBytes;
|
|
104752
104884
|
try {
|
|
104753
|
-
preparedBytes =
|
|
104754
|
-
sourceBytes =
|
|
104885
|
+
preparedBytes = import_node_fs105.default.readFileSync(preparedFile);
|
|
104886
|
+
sourceBytes = import_node_fs105.default.readFileSync(sourceFile);
|
|
104755
104887
|
} catch {
|
|
104756
104888
|
return null;
|
|
104757
104889
|
}
|
|
@@ -104781,7 +104913,7 @@ function rewritePreparedPaths(options2) {
|
|
|
104781
104913
|
return match;
|
|
104782
104914
|
const separator = value.lastIndexOf("#");
|
|
104783
104915
|
const preparedFile = value.slice(0, separator);
|
|
104784
|
-
if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${
|
|
104916
|
+
if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path107.default.sep}`)) {
|
|
104785
104917
|
refusedPlugin = true;
|
|
104786
104918
|
return match;
|
|
104787
104919
|
}
|
|
@@ -104829,22 +104961,22 @@ function rewritePreparedPaths(options2) {
|
|
|
104829
104961
|
frameworkDependencies[sourceDir] = sourceDigest;
|
|
104830
104962
|
let portableDir = sourceDir;
|
|
104831
104963
|
if (preparedDigest !== sourceDigest) {
|
|
104832
|
-
const parent =
|
|
104833
|
-
portableDir =
|
|
104834
|
-
if (!
|
|
104835
|
-
|
|
104836
|
-
const tmp =
|
|
104964
|
+
const parent = import_node_path107.default.join(expoDiscoveryCacheDir(), "frameworks", preparedDigest);
|
|
104965
|
+
portableDir = import_node_path107.default.join(parent, import_node_path107.default.basename(dir));
|
|
104966
|
+
if (!import_node_fs105.default.existsSync(portableDir)) {
|
|
104967
|
+
import_node_fs105.default.mkdirSync(parent, { recursive: true });
|
|
104968
|
+
const tmp = import_node_path107.default.join(parent, `.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`);
|
|
104837
104969
|
try {
|
|
104838
|
-
|
|
104970
|
+
import_node_fs105.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
|
|
104839
104971
|
if (frameworkDigest(tmp, signal) !== preparedDigest)
|
|
104840
104972
|
return { refuse: `framework changed while copying: ${dir}` };
|
|
104841
104973
|
try {
|
|
104842
|
-
|
|
104974
|
+
import_node_fs105.default.renameSync(tmp, portableDir);
|
|
104843
104975
|
} catch (error) {
|
|
104844
|
-
if (!
|
|
104976
|
+
if (!import_node_fs105.default.existsSync(portableDir)) throw error;
|
|
104845
104977
|
}
|
|
104846
104978
|
} finally {
|
|
104847
|
-
|
|
104979
|
+
import_node_fs105.default.rmSync(tmp, { recursive: true, force: true });
|
|
104848
104980
|
}
|
|
104849
104981
|
}
|
|
104850
104982
|
if (frameworkDigest(portableDir, signal) !== preparedDigest)
|
|
@@ -104861,10 +104993,10 @@ function rewritePreparedPaths(options2) {
|
|
|
104861
104993
|
function writeExpoDiscovery(options2) {
|
|
104862
104994
|
try {
|
|
104863
104995
|
const dir = expoDiscoveryCacheDir();
|
|
104864
|
-
|
|
104865
|
-
const tmp =
|
|
104996
|
+
import_node_fs105.default.mkdirSync(dir, { recursive: true });
|
|
104997
|
+
const tmp = import_node_path107.default.join(dir, `.${options2.key}.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`);
|
|
104866
104998
|
if (options2.units === null) {
|
|
104867
|
-
|
|
104999
|
+
import_node_fs105.default.writeFileSync(
|
|
104868
105000
|
tmp,
|
|
104869
105001
|
JSON.stringify({
|
|
104870
105002
|
format: FORMAT,
|
|
@@ -104874,11 +105006,11 @@ function writeExpoDiscovery(options2) {
|
|
|
104874
105006
|
frameworks: {}
|
|
104875
105007
|
})
|
|
104876
105008
|
);
|
|
104877
|
-
|
|
104878
|
-
expireDiscovery(dir,
|
|
105009
|
+
import_node_fs105.default.renameSync(tmp, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
105010
|
+
expireDiscovery(dir, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
104879
105011
|
return null;
|
|
104880
105012
|
}
|
|
104881
|
-
const preparedRoot =
|
|
105013
|
+
const preparedRoot = import_node_fs105.default.realpathSync(options2.preparedRoot);
|
|
104882
105014
|
const rewritten = rewritePreparedPaths({
|
|
104883
105015
|
units: options2.units,
|
|
104884
105016
|
sourceRoot: options2.sourceRoot,
|
|
@@ -104886,8 +105018,8 @@ function writeExpoDiscovery(options2) {
|
|
|
104886
105018
|
signal: options2.signal
|
|
104887
105019
|
});
|
|
104888
105020
|
if ("refuse" in rewritten) return rewritten.refuse;
|
|
104889
|
-
const blobDir =
|
|
104890
|
-
|
|
105021
|
+
const blobDir = import_node_path107.default.join(dir, "blobs");
|
|
105022
|
+
import_node_fs105.default.mkdirSync(blobDir, { recursive: true });
|
|
104891
105023
|
const seen = /* @__PURE__ */ new Map();
|
|
104892
105024
|
const chunks = [];
|
|
104893
105025
|
let size2 = 0;
|
|
@@ -104926,14 +105058,14 @@ function writeExpoDiscovery(options2) {
|
|
|
104926
105058
|
);
|
|
104927
105059
|
const contents2 = (0, import_node_zlib7.zstdCompressSync)(Buffer.concat(chunks, size2));
|
|
104928
105060
|
const archive = (0, import_node_crypto63.createHash)("sha256").update(contents2).digest("hex");
|
|
104929
|
-
const temporary =
|
|
105061
|
+
const temporary = import_node_path107.default.join(blobDir, "." + (0, import_node_crypto63.randomUUID)() + ".tmp");
|
|
104930
105062
|
try {
|
|
104931
|
-
|
|
104932
|
-
|
|
105063
|
+
import_node_fs105.default.writeFileSync(temporary, contents2);
|
|
105064
|
+
import_node_fs105.default.renameSync(temporary, import_node_path107.default.join(blobDir, `${archive}.zst`));
|
|
104933
105065
|
} finally {
|
|
104934
|
-
|
|
105066
|
+
import_node_fs105.default.rmSync(temporary, { force: true });
|
|
104935
105067
|
}
|
|
104936
|
-
|
|
105068
|
+
import_node_fs105.default.writeFileSync(
|
|
104937
105069
|
tmp,
|
|
104938
105070
|
JSON.stringify({
|
|
104939
105071
|
format: FORMAT,
|
|
@@ -104944,8 +105076,8 @@ function writeExpoDiscovery(options2) {
|
|
|
104944
105076
|
frameworks: rewritten.frameworks
|
|
104945
105077
|
})
|
|
104946
105078
|
);
|
|
104947
|
-
|
|
104948
|
-
expireDiscovery(dir,
|
|
105079
|
+
import_node_fs105.default.renameSync(tmp, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
105080
|
+
expireDiscovery(dir, import_node_path107.default.join(dir, `${options2.key}.json`));
|
|
104949
105081
|
saveFileHashes();
|
|
104950
105082
|
return rewritten.units;
|
|
104951
105083
|
} catch (error) {
|
|
@@ -104953,13 +105085,13 @@ function writeExpoDiscovery(options2) {
|
|
|
104953
105085
|
return error instanceof Error ? error.message : String(error);
|
|
104954
105086
|
}
|
|
104955
105087
|
}
|
|
104956
|
-
var import_node_crypto63,
|
|
105088
|
+
var import_node_crypto63, import_node_fs105, import_node_path107, import_node_zlib7, FORMAT, EXPIRY_MS, ORPHAN_TEMPORARY_MS, strings2, stringRecord, isDigest, digestRecord, isBodyOffset, isBodyOffsets, sourceLocationLine, fileHashes, fileHashesLoaded, fileHashesChanged, MISSING_TREE;
|
|
104957
105089
|
var init_expo_discovery_cache = __esm({
|
|
104958
105090
|
"src/expo-discovery-cache.ts"() {
|
|
104959
105091
|
"use strict";
|
|
104960
105092
|
import_node_crypto63 = require("node:crypto");
|
|
104961
|
-
|
|
104962
|
-
|
|
105093
|
+
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
105094
|
+
import_node_path107 = __toESM(require("node:path"), 1);
|
|
104963
105095
|
import_node_zlib7 = require("node:zlib");
|
|
104964
105096
|
init_expo_eager_seam_contract();
|
|
104965
105097
|
init_answeredNativePackages();
|
|
@@ -105002,7 +105134,7 @@ function isExpoSwiftCompilationResult(value) {
|
|
|
105002
105134
|
if (value.bridgeModules !== void 0 && (!strings3(value.bridgeModules) || !value.bridgeModules.every((name3) => remaining.has(name3))))
|
|
105003
105135
|
return false;
|
|
105004
105136
|
for (const artifact of value.modules) {
|
|
105005
|
-
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(
|
|
105137
|
+
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(
|
|
105006
105138
|
([key2, bytes]) => isSwiftResourcePath(key2) && typeof bytes === "string"
|
|
105007
105139
|
)))
|
|
105008
105140
|
return false;
|
|
@@ -105113,7 +105245,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
105113
105245
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary3.RTCAppGroupIdentifier);
|
|
105114
105246
|
const screenShareExtensionBundleId = typeof dictionary3.ScreenShareExtensionBundleId === "string" ? dictionary3.ScreenShareExtensionBundleId : void 0;
|
|
105115
105247
|
const rootModuleName = readRootModuleName(
|
|
105116
|
-
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) &&
|
|
105248
|
+
app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs106.default.existsSync(file)).map((file) => import_node_fs106.default.readFileSync(file, "utf8"))
|
|
105117
105249
|
);
|
|
105118
105250
|
const identity2 = {
|
|
105119
105251
|
...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
|
|
@@ -105137,7 +105269,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
105137
105269
|
googleSignIn: readGoogleSignInConfiguration(
|
|
105138
105270
|
dictionary3,
|
|
105139
105271
|
Object.fromEntries(
|
|
105140
|
-
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(
|
|
105272
|
+
app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parsePlistBytes(import_node_fs106.default.readFileSync(file), parseInfoPlist)])
|
|
105141
105273
|
)
|
|
105142
105274
|
),
|
|
105143
105275
|
supportedInterfaceOrientations,
|
|
@@ -105147,11 +105279,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
105147
105279
|
bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
|
|
105148
105280
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
105149
105281
|
app.resources,
|
|
105150
|
-
(file) =>
|
|
105282
|
+
(file) => import_node_fs106.default.readFileSync(file, "utf8"),
|
|
105151
105283
|
(file) => {
|
|
105152
|
-
const extension =
|
|
105284
|
+
const extension = import_node_path108.default.extname(file).toLowerCase();
|
|
105153
105285
|
const contentType2 = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
105154
|
-
return `data:${contentType2};base64,${
|
|
105286
|
+
return `data:${contentType2};base64,${import_node_fs106.default.readFileSync(file).toString("base64")}`;
|
|
105155
105287
|
},
|
|
105156
105288
|
icons,
|
|
105157
105289
|
app.appIconName,
|
|
@@ -105187,41 +105319,41 @@ function readNativeAppIdentityFromProject(projectRoot, platform3, parseInfoPlist
|
|
|
105187
105319
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
105188
105320
|
const files2 = {};
|
|
105189
105321
|
if (androidMergedManifest) {
|
|
105190
|
-
const file =
|
|
105191
|
-
if (!
|
|
105192
|
-
files2[androidMergedManifest] =
|
|
105322
|
+
const file = import_node_path108.default.resolve(projectRoot, androidMergedManifest);
|
|
105323
|
+
if (!import_node_fs106.default.existsSync(file)) return null;
|
|
105324
|
+
files2[androidMergedManifest] = import_node_fs106.default.readFileSync(file, "utf8");
|
|
105193
105325
|
} else {
|
|
105194
|
-
const androidRoot =
|
|
105195
|
-
if (!
|
|
105326
|
+
const androidRoot = import_node_path108.default.join(projectRoot, "android");
|
|
105327
|
+
if (!import_node_fs106.default.existsSync(androidRoot)) return null;
|
|
105196
105328
|
const collect = (directory2) => {
|
|
105197
|
-
for (const entry of
|
|
105198
|
-
const file =
|
|
105329
|
+
for (const entry of import_node_fs106.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
105330
|
+
const file = import_node_path108.default.join(directory2, entry.name);
|
|
105199
105331
|
if (entry.isDirectory()) collect(file);
|
|
105200
105332
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
105201
|
-
files2[
|
|
105333
|
+
files2[import_node_path108.default.relative(projectRoot, file).split(import_node_path108.default.sep).join("/")] = import_node_fs106.default.readFileSync(file, "utf8");
|
|
105202
105334
|
}
|
|
105203
105335
|
};
|
|
105204
|
-
for (const module2 of
|
|
105336
|
+
for (const module2 of import_node_fs106.default.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
105205
105337
|
if (!module2.isDirectory()) continue;
|
|
105206
|
-
const outputs =
|
|
105338
|
+
const outputs = import_node_path108.default.join(
|
|
105207
105339
|
androidRoot,
|
|
105208
105340
|
module2.name,
|
|
105209
105341
|
"build/intermediates/merged_manifests"
|
|
105210
105342
|
);
|
|
105211
|
-
if (
|
|
105343
|
+
if (import_node_fs106.default.existsSync(outputs)) collect(outputs);
|
|
105212
105344
|
}
|
|
105213
105345
|
}
|
|
105214
105346
|
for (const manifest of Object.keys(files2)) {
|
|
105215
105347
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
105216
105348
|
if (!resourceDirectory) continue;
|
|
105217
|
-
const absolute =
|
|
105218
|
-
if (!
|
|
105219
|
-
for (const entry of
|
|
105349
|
+
const absolute = import_node_path108.default.resolve(projectRoot, resourceDirectory);
|
|
105350
|
+
if (!import_node_fs106.default.existsSync(absolute)) continue;
|
|
105351
|
+
for (const entry of import_node_fs106.default.readdirSync(absolute, { withFileTypes: true })) {
|
|
105220
105352
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
105221
|
-
for (const resource of
|
|
105353
|
+
for (const resource of import_node_fs106.default.readdirSync(import_node_path108.default.join(absolute, entry.name))) {
|
|
105222
105354
|
if (!resource.endsWith(".xml")) continue;
|
|
105223
105355
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
105224
|
-
files2[file] =
|
|
105356
|
+
files2[file] = import_node_fs106.default.readFileSync(import_node_path108.default.resolve(projectRoot, file), "utf8");
|
|
105225
105357
|
}
|
|
105226
105358
|
}
|
|
105227
105359
|
}
|
|
@@ -105242,7 +105374,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
105242
105374
|
parseInfoPlist,
|
|
105243
105375
|
buildSdkVersion
|
|
105244
105376
|
);
|
|
105245
|
-
const projectManifestPath =
|
|
105377
|
+
const projectManifestPath = import_node_path108.default.join(projectRoot, "package.json");
|
|
105246
105378
|
const projectRequire = (0, import_node_module11.createRequire)(projectManifestPath);
|
|
105247
105379
|
let reanimatedManifestPath;
|
|
105248
105380
|
try {
|
|
@@ -105256,22 +105388,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
105256
105388
|
throw error;
|
|
105257
105389
|
}
|
|
105258
105390
|
const installedManifest = JSON.parse(
|
|
105259
|
-
|
|
105391
|
+
import_node_fs106.default.readFileSync(reanimatedManifestPath, "utf8")
|
|
105260
105392
|
);
|
|
105261
105393
|
const installedVersion2 = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
105262
105394
|
if (!installedVersion2) throw new Error("Reanimated package version is malformed");
|
|
105263
105395
|
if (Number.parseInt(installedVersion2, 10) < 4) return identity2;
|
|
105264
105396
|
const defaults = JSON.parse(
|
|
105265
|
-
|
|
105266
|
-
|
|
105267
|
-
|
|
105397
|
+
import_node_fs106.default.readFileSync(
|
|
105398
|
+
import_node_path108.default.join(
|
|
105399
|
+
import_node_path108.default.dirname(reanimatedManifestPath),
|
|
105268
105400
|
"src/featureFlags/staticFlags.json"
|
|
105269
105401
|
),
|
|
105270
105402
|
"utf8"
|
|
105271
105403
|
)
|
|
105272
105404
|
);
|
|
105273
105405
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
105274
|
-
const manifest = JSON.parse(
|
|
105406
|
+
const manifest = JSON.parse(import_node_fs106.default.readFileSync(projectManifestPath, "utf8"));
|
|
105275
105407
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
105276
105408
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
105277
105409
|
if (overrides !== void 0 && !isRecord(overrides)) {
|
|
@@ -105302,13 +105434,13 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
|
105302
105434
|
environment
|
|
105303
105435
|
});
|
|
105304
105436
|
}
|
|
105305
|
-
var
|
|
105437
|
+
var import_node_fs106, import_node_module11, import_node_path108, SDK_BEFORE_SCENE_REQUIREMENT;
|
|
105306
105438
|
var init_native_app_identity_project = __esm({
|
|
105307
105439
|
"src/native-app-identity-project.ts"() {
|
|
105308
105440
|
"use strict";
|
|
105309
|
-
|
|
105441
|
+
import_node_fs106 = __toESM(require("node:fs"), 1);
|
|
105310
105442
|
import_node_module11 = require("node:module");
|
|
105311
|
-
|
|
105443
|
+
import_node_path108 = __toESM(require("node:path"), 1);
|
|
105312
105444
|
init_android_app_identity();
|
|
105313
105445
|
init_is_record();
|
|
105314
105446
|
init_native_app_identity();
|
|
@@ -105324,14 +105456,14 @@ var init_native_app_identity_project = __esm({
|
|
|
105324
105456
|
|
|
105325
105457
|
// src/native-firebase-config.ts
|
|
105326
105458
|
function resolveExpoConfigModule(appDir) {
|
|
105327
|
-
const expo = (0, import_node_module12.createRequire)(
|
|
105459
|
+
const expo = (0, import_node_module12.createRequire)(import_node_path109.default.join(appDir, "package.json")).resolve(
|
|
105328
105460
|
"expo/package.json"
|
|
105329
105461
|
);
|
|
105330
105462
|
return (0, import_node_module12.createRequire)(expo).resolve("@expo/config");
|
|
105331
105463
|
}
|
|
105332
105464
|
function hasExpoConfig(projectRoot) {
|
|
105333
|
-
const packagePath =
|
|
105334
|
-
const manifest =
|
|
105465
|
+
const packagePath = import_node_path109.default.join(projectRoot, "package.json");
|
|
105466
|
+
const manifest = import_node_fs107.default.existsSync(packagePath) ? JSON.parse(import_node_fs107.default.readFileSync(packagePath, "utf8")) : null;
|
|
105335
105467
|
if (isRecord(manifest)) {
|
|
105336
105468
|
const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
|
|
105337
105469
|
isRecord
|
|
@@ -105339,13 +105471,13 @@ function hasExpoConfig(projectRoot) {
|
|
|
105339
105471
|
if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
|
|
105340
105472
|
return false;
|
|
105341
105473
|
}
|
|
105342
|
-
const appJsonPath =
|
|
105343
|
-
const appJson =
|
|
105474
|
+
const appJsonPath = import_node_path109.default.join(projectRoot, "app.json");
|
|
105475
|
+
const appJson = import_node_fs107.default.existsSync(appJsonPath) ? JSON.parse(import_node_fs107.default.readFileSync(appJsonPath, "utf8")) : null;
|
|
105344
105476
|
const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
105345
105477
|
(value) => isRecord(value) && typeof value.googleServicesFile === "string"
|
|
105346
105478
|
));
|
|
105347
105479
|
return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
|
|
105348
|
-
(name3) =>
|
|
105480
|
+
(name3) => import_node_fs107.default.existsSync(import_node_path109.default.join(projectRoot, name3))
|
|
105349
105481
|
);
|
|
105350
105482
|
}
|
|
105351
105483
|
function expoConfigArgs(projectRoot, resultPath) {
|
|
@@ -105353,7 +105485,7 @@ function expoConfigArgs(projectRoot, resultPath) {
|
|
|
105353
105485
|
"--input-type=commonjs",
|
|
105354
105486
|
"-e",
|
|
105355
105487
|
EXPO_CONFIG_SCRIPT,
|
|
105356
|
-
|
|
105488
|
+
import_node_path109.default.resolve(projectRoot),
|
|
105357
105489
|
resultPath
|
|
105358
105490
|
];
|
|
105359
105491
|
}
|
|
@@ -105366,14 +105498,14 @@ function readExpoConfigResult(resultPath, status, signal, stderr) {
|
|
|
105366
105498
|
throw new Error(
|
|
105367
105499
|
stderr || (signal ? `Expo native configuration evaluation was killed by ${signal}.` : "Expo native configuration evaluation failed.")
|
|
105368
105500
|
);
|
|
105369
|
-
const resolved = JSON.parse(
|
|
105501
|
+
const resolved = JSON.parse(import_node_fs107.default.readFileSync(resultPath, "utf8"));
|
|
105370
105502
|
if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
|
|
105371
105503
|
return resolved;
|
|
105372
105504
|
}
|
|
105373
105505
|
function readExpoConfig(projectRoot) {
|
|
105374
105506
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
105375
105507
|
const directory2 = resultDirectory();
|
|
105376
|
-
const resultPath =
|
|
105508
|
+
const resultPath = import_node_path109.default.join(directory2, "config.json");
|
|
105377
105509
|
try {
|
|
105378
105510
|
const child = (0, import_node_child_process51.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
105379
105511
|
cwd: projectRoot,
|
|
@@ -105385,13 +105517,13 @@ function readExpoConfig(projectRoot) {
|
|
|
105385
105517
|
if (child.error) throw child.error;
|
|
105386
105518
|
return readExpoConfigResult(resultPath, child.status, child.signal, child.stderr);
|
|
105387
105519
|
} finally {
|
|
105388
|
-
|
|
105520
|
+
import_node_fs107.default.rmSync(directory2, { recursive: true, force: true });
|
|
105389
105521
|
}
|
|
105390
105522
|
}
|
|
105391
105523
|
async function readExpoConfigAsync(projectRoot) {
|
|
105392
105524
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
105393
105525
|
const directory2 = resultDirectory();
|
|
105394
|
-
const resultPath =
|
|
105526
|
+
const resultPath = import_node_path109.default.join(directory2, "config.json");
|
|
105395
105527
|
try {
|
|
105396
105528
|
const child = (0, import_node_child_process51.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
105397
105529
|
cwd: projectRoot,
|
|
@@ -105411,7 +105543,7 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
105411
105543
|
);
|
|
105412
105544
|
return readExpoConfigResult(resultPath, status, signal, stderr);
|
|
105413
105545
|
} finally {
|
|
105414
|
-
|
|
105546
|
+
import_node_fs107.default.rmSync(directory2, { recursive: true, force: true });
|
|
105415
105547
|
}
|
|
105416
105548
|
}
|
|
105417
105549
|
function splitStatements(raw2) {
|
|
@@ -105454,7 +105586,7 @@ function splitClauses(condition) {
|
|
|
105454
105586
|
function findHelper(type, name3, label, sources) {
|
|
105455
105587
|
const found2 = [];
|
|
105456
105588
|
for (const file of sources) {
|
|
105457
|
-
const raw2 =
|
|
105589
|
+
const raw2 = import_node_fs107.default.readFileSync(file, "utf8");
|
|
105458
105590
|
const blank = blankSwiftObjcLiterals(raw2);
|
|
105459
105591
|
if (file.endsWith(".swift") && label === void 0) {
|
|
105460
105592
|
const owners = type ? [
|
|
@@ -105540,7 +105672,7 @@ function evaluateSwiftBody(body, scope2, depth) {
|
|
|
105540
105672
|
}
|
|
105541
105673
|
function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
105542
105674
|
const plists = scope2.resources.filter(
|
|
105543
|
-
(file) =>
|
|
105675
|
+
(file) => import_node_path109.default.basename(file) === "GoogleService-Info.plist"
|
|
105544
105676
|
);
|
|
105545
105677
|
const variables = /* @__PURE__ */ new Map();
|
|
105546
105678
|
const literal6 = (text7) => {
|
|
@@ -105583,7 +105715,7 @@ function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
|
105583
105715
|
variables.set(name3, plists.length === 1 ? plists[0] : void 0);
|
|
105584
105716
|
} else if (dictionary3 && variables.has(dictionary3[1])) {
|
|
105585
105717
|
const file = variables.get(dictionary3[1]);
|
|
105586
|
-
const parsed2 = typeof file === "string" ? parsePlistSource(
|
|
105718
|
+
const parsed2 = typeof file === "string" ? parsePlistSource(import_node_fs107.default.readFileSync(file, "utf8")) : void 0;
|
|
105587
105719
|
variables.set(name3, isRecord(parsed2) ? parsed2 : void 0);
|
|
105588
105720
|
} else if (entry && variables.has(entry[1])) {
|
|
105589
105721
|
const key2 = literal6(entry[2]);
|
|
@@ -105596,7 +105728,7 @@ function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
|
105596
105728
|
}
|
|
105597
105729
|
function evaluateClauses(clauses, scope2, bound, depth) {
|
|
105598
105730
|
const sources = scope2.resources.filter(
|
|
105599
|
-
(file) =>
|
|
105731
|
+
(file) => import_node_path109.default.basename(file) === "GoogleService-Info.plist"
|
|
105600
105732
|
);
|
|
105601
105733
|
for (const clause of clauses) {
|
|
105602
105734
|
if (clause === "true") continue;
|
|
@@ -105613,7 +105745,7 @@ function evaluateClauses(clauses, scope2, bound, depth) {
|
|
|
105613
105745
|
const dictionary3 = /^let\s+(\w+)\s*=\s*NSDictionary\s*\(\s*contentsOfFile:\s*(\w+)\s*\)$/.exec(clause);
|
|
105614
105746
|
if (dictionary3 && typeof bound.get(dictionary3[2]) === "string") {
|
|
105615
105747
|
const parsed2 = parsePlistSource(
|
|
105616
|
-
|
|
105748
|
+
import_node_fs107.default.readFileSync(String(bound.get(dictionary3[2])), "utf8")
|
|
105617
105749
|
);
|
|
105618
105750
|
if (!isRecord(parsed2)) return false;
|
|
105619
105751
|
bound.set(dictionary3[1], parsed2);
|
|
@@ -105702,7 +105834,7 @@ function findDefaultConfigureCall(body, sources) {
|
|
|
105702
105834
|
const [, type, name3] = call;
|
|
105703
105835
|
for (const file of sources) {
|
|
105704
105836
|
if (!file.endsWith(".swift")) continue;
|
|
105705
|
-
const source = blankSwiftObjcLiterals(
|
|
105837
|
+
const source = blankSwiftObjcLiterals(import_node_fs107.default.readFileSync(file, "utf8"));
|
|
105706
105838
|
const declaration = new RegExp(
|
|
105707
105839
|
`\\b(?:enum|struct|class)\\s+${type}\\b[^{]*\\{`
|
|
105708
105840
|
).exec(source);
|
|
@@ -105724,10 +105856,10 @@ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGen
|
|
|
105724
105856
|
prepareGeneratedSources
|
|
105725
105857
|
});
|
|
105726
105858
|
const delegates = app.allSources.filter(
|
|
105727
|
-
(file) => /^AppDelegate\.(swift|mm|m)$/.test(
|
|
105859
|
+
(file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path109.default.basename(file))
|
|
105728
105860
|
);
|
|
105729
105861
|
const defaultConfigured = delegates.some((file) => {
|
|
105730
|
-
const raw2 =
|
|
105862
|
+
const raw2 = import_node_fs107.default.readFileSync(file, "utf8");
|
|
105731
105863
|
const source = blankSwiftObjcLiterals(raw2);
|
|
105732
105864
|
const launch2 = /(?:\bfunc\s+application\s*\([\s\S]*?didFinishLaunchingWithOptions[\s\S]*?\)\s*->\s*Bool|^-\s*\(BOOL\)\s*application\s*:[\s\S]*?didFinishLaunchingWithOptions[^{]*)\s*\{/m.exec(
|
|
105733
105865
|
source
|
|
@@ -105798,17 +105930,17 @@ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGen
|
|
|
105798
105930
|
return guarded;
|
|
105799
105931
|
});
|
|
105800
105932
|
if (!defaultConfigured) return null;
|
|
105801
|
-
const bundle =
|
|
105933
|
+
const bundle = import_node_path109.default.join(
|
|
105802
105934
|
app.settings("BUILT_PRODUCTS_DIR"),
|
|
105803
105935
|
app.settings("WRAPPER_NAME") || `${app.settings("PRODUCT_NAME")}.app`
|
|
105804
105936
|
);
|
|
105805
105937
|
const staged = app.copiedFiles.filter(
|
|
105806
|
-
({ from, to }) => to ===
|
|
105807
|
-
).map(({ from }) =>
|
|
105938
|
+
({ from, to }) => to === import_node_path109.default.join(bundle, "GoogleService-Info.plist") && import_node_fs107.default.existsSync(from)
|
|
105939
|
+
).map(({ from }) => import_node_fs107.default.realpathSync(from));
|
|
105808
105940
|
const resources = [
|
|
105809
105941
|
.../* @__PURE__ */ new Set([
|
|
105810
105942
|
...app.resources.filter(
|
|
105811
|
-
(file) => /^GoogleService-Info\.plist$/.test(
|
|
105943
|
+
(file) => /^GoogleService-Info\.plist$/.test(import_node_path109.default.basename(file))
|
|
105812
105944
|
),
|
|
105813
105945
|
...staged
|
|
105814
105946
|
])
|
|
@@ -105817,7 +105949,7 @@ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGen
|
|
|
105817
105949
|
throw new Error(
|
|
105818
105950
|
"native Firebase default initialization requires one GoogleService-Info.plist build resource"
|
|
105819
105951
|
);
|
|
105820
|
-
return
|
|
105952
|
+
return import_node_path109.default.relative(import_node_fs107.default.realpathSync(projectRoot), resources[0]);
|
|
105821
105953
|
}
|
|
105822
105954
|
function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"], iosTarget, config = readExpoConfig(projectRoot), prepareGeneratedSources = false) {
|
|
105823
105955
|
const result = {};
|
|
@@ -105838,8 +105970,8 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
105838
105970
|
const native = config[platform3];
|
|
105839
105971
|
if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
|
|
105840
105972
|
try {
|
|
105841
|
-
const source =
|
|
105842
|
-
|
|
105973
|
+
const source = import_node_fs107.default.readFileSync(
|
|
105974
|
+
import_node_path109.default.resolve(projectRoot, native.googleServicesFile),
|
|
105843
105975
|
"utf8"
|
|
105844
105976
|
);
|
|
105845
105977
|
const parsed2 = platform3 === "ios" ? parsePlistSource(source) : JSON.parse(source);
|
|
@@ -105891,15 +106023,15 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
105891
106023
|
}
|
|
105892
106024
|
return result;
|
|
105893
106025
|
}
|
|
105894
|
-
var import_node_child_process51,
|
|
106026
|
+
var import_node_child_process51, import_node_fs107, import_node_module12, import_node_os22, import_node_path109, EXPO_CONFIG_SCRIPT, EXPO_CONFIG_TIMEOUT_MS, resultDirectory, HELPER_DEPTH, stripComments;
|
|
105895
106027
|
var init_native_firebase_config = __esm({
|
|
105896
106028
|
"src/native-firebase-config.ts"() {
|
|
105897
106029
|
"use strict";
|
|
105898
106030
|
import_node_child_process51 = require("node:child_process");
|
|
105899
|
-
|
|
106031
|
+
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
105900
106032
|
import_node_module12 = require("node:module");
|
|
105901
106033
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
105902
|
-
|
|
106034
|
+
import_node_path109 = __toESM(require("node:path"), 1);
|
|
105903
106035
|
init_is_record();
|
|
105904
106036
|
init_plist();
|
|
105905
106037
|
init_xcode_project();
|
|
@@ -105920,7 +106052,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
105920
106052
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
105921
106053
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
105922
106054
|
EXPO_CONFIG_TIMEOUT_MS = 3e4;
|
|
105923
|
-
resultDirectory = () =>
|
|
106055
|
+
resultDirectory = () => import_node_fs107.default.mkdtempSync(import_node_path109.default.join(import_node_os22.default.tmpdir(), "peach-expo-config-"));
|
|
105924
106056
|
HELPER_DEPTH = 3;
|
|
105925
106057
|
stripComments = (raw2) => raw2.replace(
|
|
105926
106058
|
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
@@ -106027,12 +106159,12 @@ var init_nitroContract = __esm({
|
|
|
106027
106159
|
function hashPackageTree(root, options2) {
|
|
106028
106160
|
const files2 = [];
|
|
106029
106161
|
const walk4 = (directory2, relative7) => {
|
|
106030
|
-
for (const entry of (0,
|
|
106162
|
+
for (const entry of (0, import_node_fs108.readdirSync)(directory2, { withFileTypes: true }).sort(
|
|
106031
106163
|
(a, b) => options2.compareNames(a.name, b.name)
|
|
106032
106164
|
)) {
|
|
106033
106165
|
if (entry.name === "node_modules") continue;
|
|
106034
106166
|
const path195 = `${relative7}${entry.name}`;
|
|
106035
|
-
if (entry.isDirectory()) walk4((0,
|
|
106167
|
+
if (entry.isDirectory()) walk4((0, import_node_path110.join)(directory2, entry.name), `${path195}/`);
|
|
106036
106168
|
else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path195);
|
|
106037
106169
|
}
|
|
106038
106170
|
};
|
|
@@ -106041,7 +106173,7 @@ function hashPackageTree(root, options2) {
|
|
|
106041
106173
|
return (async () => {
|
|
106042
106174
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
106043
106175
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
106044
|
-
const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0,
|
|
106176
|
+
const bytes = await Promise.all(batch.map((file) => (0, import_promises12.readFile)((0, import_node_path110.join)(root, file))));
|
|
106045
106177
|
batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
|
|
106046
106178
|
}
|
|
106047
106179
|
return hash.digest("hex");
|
|
@@ -106058,14 +106190,14 @@ function nativePackageTreeDigest(root) {
|
|
|
106058
106190
|
skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
|
|
106059
106191
|
});
|
|
106060
106192
|
}
|
|
106061
|
-
var import_node_crypto64,
|
|
106193
|
+
var import_node_crypto64, import_node_fs108, import_promises12, import_node_path110, READ_AHEAD;
|
|
106062
106194
|
var init_package_tree_digest = __esm({
|
|
106063
106195
|
"src/package-tree-digest.ts"() {
|
|
106064
106196
|
"use strict";
|
|
106065
106197
|
import_node_crypto64 = require("node:crypto");
|
|
106066
|
-
|
|
106198
|
+
import_node_fs108 = require("node:fs");
|
|
106067
106199
|
import_promises12 = require("node:fs/promises");
|
|
106068
|
-
|
|
106200
|
+
import_node_path110 = require("node:path");
|
|
106069
106201
|
READ_AHEAD = 64;
|
|
106070
106202
|
}
|
|
106071
106203
|
});
|
|
@@ -106091,16 +106223,16 @@ function packageRootOf(appRoot, file) {
|
|
|
106091
106223
|
if (parts2[0] !== "node_modules") return null;
|
|
106092
106224
|
const at = parts2.lastIndexOf("node_modules") + 1;
|
|
106093
106225
|
const end = at + (parts2[at]?.startsWith("@") ? 2 : 1);
|
|
106094
|
-
return parts2.length > end ?
|
|
106226
|
+
return parts2.length > end ? import_node_path111.default.join(appRoot, ...parts2.slice(0, end)) : null;
|
|
106095
106227
|
}
|
|
106096
106228
|
async function expoNativeInputs(appRoot) {
|
|
106097
|
-
appRoot =
|
|
106098
|
-
if (findXcodeProject(
|
|
106099
|
-
const appRequire = (0, import_node_module13.createRequire)(
|
|
106229
|
+
appRoot = import_node_fs109.default.realpathSync(appRoot);
|
|
106230
|
+
if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
|
|
106231
|
+
const appRequire = (0, import_node_module13.createRequire)(import_node_path111.default.join(appRoot, "package.json"));
|
|
106100
106232
|
let fingerprintEntry;
|
|
106101
106233
|
try {
|
|
106102
106234
|
fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
|
|
106103
|
-
paths: [
|
|
106235
|
+
paths: [import_node_path111.default.dirname(appRequire.resolve("expo/package.json"))]
|
|
106104
106236
|
});
|
|
106105
106237
|
} catch {
|
|
106106
106238
|
return null;
|
|
@@ -106126,7 +106258,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
106126
106258
|
const root = (source.type === "package" || source.type === "dir") && source.filePath ? packageRootOf(appRoot, source.filePath) : null;
|
|
106127
106259
|
if (!root) continue;
|
|
106128
106260
|
const manifest = JSON.parse(
|
|
106129
|
-
|
|
106261
|
+
import_node_fs109.default.readFileSync(import_node_path111.default.join(root, "package.json"), "utf8")
|
|
106130
106262
|
);
|
|
106131
106263
|
if (!isRecord(manifest) || typeof manifest.name !== "string")
|
|
106132
106264
|
throw new Error(`${root}: package has no name`);
|
|
@@ -106134,7 +106266,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
106134
106266
|
}
|
|
106135
106267
|
packages.set(
|
|
106136
106268
|
"react-native",
|
|
106137
|
-
|
|
106269
|
+
import_node_path111.default.dirname(appRequire.resolve("react-native/package.json"))
|
|
106138
106270
|
);
|
|
106139
106271
|
return {
|
|
106140
106272
|
inputs: {
|
|
@@ -106195,7 +106327,7 @@ function readExpoNativeEntry(value) {
|
|
|
106195
106327
|
};
|
|
106196
106328
|
}
|
|
106197
106329
|
async function answer(appRoot) {
|
|
106198
|
-
if (findXcodeProject(
|
|
106330
|
+
if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
|
|
106199
106331
|
const [source, config] = await Promise.all([
|
|
106200
106332
|
hashExpoSourceWorkspace(appRoot),
|
|
106201
106333
|
readExpoConfigAsync(appRoot)
|
|
@@ -106225,7 +106357,7 @@ async function lookup2(appRoot) {
|
|
|
106225
106357
|
}
|
|
106226
106358
|
function prebuiltExpoNative(appRoot, iosTarget) {
|
|
106227
106359
|
if (iosTarget !== void 0) return Promise.resolve(null);
|
|
106228
|
-
const root =
|
|
106360
|
+
const root = import_node_fs109.default.realpathSync(appRoot);
|
|
106229
106361
|
let pending2 = lookups.get(root);
|
|
106230
106362
|
if (!pending2) {
|
|
106231
106363
|
pending2 = answer(root).finally(() => lookups.delete(root));
|
|
@@ -106235,20 +106367,20 @@ function prebuiltExpoNative(appRoot, iosTarget) {
|
|
|
106235
106367
|
}
|
|
106236
106368
|
async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
|
|
106237
106369
|
const prepared = await prepareExpoNativeProject(
|
|
106238
|
-
|
|
106370
|
+
import_node_fs109.default.realpathSync(appRoot),
|
|
106239
106371
|
signal,
|
|
106240
106372
|
dependencies
|
|
106241
106373
|
);
|
|
106242
|
-
const ios =
|
|
106243
|
-
const projects2 =
|
|
106374
|
+
const ios = import_node_path111.default.join(prepared.app, "ios");
|
|
106375
|
+
const projects2 = import_node_fs109.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcodeproj"));
|
|
106244
106376
|
if (projects2.length !== 1) throw new Error(`expected one Xcode project in ${ios}`);
|
|
106245
|
-
return readXcodeAppTarget(
|
|
106377
|
+
return readXcodeAppTarget(import_node_path111.default.join(ios, projects2[0]), void 0, "Debug", {
|
|
106246
106378
|
requireSources: false
|
|
106247
106379
|
});
|
|
106248
106380
|
}
|
|
106249
106381
|
function isManagedExpoApp(appRoot) {
|
|
106250
|
-
return !findXcodeProject(
|
|
106251
|
-
JSON.parse(
|
|
106382
|
+
return !findXcodeProject(import_node_path111.default.join(appRoot, "ios")) && declaresNativeDependency(
|
|
106383
|
+
JSON.parse(import_node_fs109.default.readFileSync(import_node_path111.default.join(appRoot, "package.json"), "utf8")),
|
|
106252
106384
|
"expo"
|
|
106253
106385
|
);
|
|
106254
106386
|
}
|
|
@@ -106260,7 +106392,7 @@ async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
|
|
|
106260
106392
|
}
|
|
106261
106393
|
function servedExpoSwift(appRoot, entry, app) {
|
|
106262
106394
|
if (!entry.expoSwift) return null;
|
|
106263
|
-
const rootId = `${(0, import_node_crypto65.createHash)("sha256").update(
|
|
106395
|
+
const rootId = `${(0, import_node_crypto65.createHash)("sha256").update(import_node_fs109.default.realpathSync(appRoot)).digest("hex")}/Expo`;
|
|
106264
106396
|
if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
|
|
106265
106397
|
const installed2 = installedInfoPlist(app.infoPlist, entry.infoPlist);
|
|
106266
106398
|
const infoPlist2 = Buffer.from(installed2).toString("base64");
|
|
@@ -106288,14 +106420,14 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
106288
106420
|
await prebuiltAppTarget(appRoot, signal, "installed")
|
|
106289
106421
|
);
|
|
106290
106422
|
}
|
|
106291
|
-
var import_node_crypto65,
|
|
106423
|
+
var import_node_crypto65, import_node_fs109, import_node_module13, import_node_path111, import_node_util14, EXPO_NATIVE_ENTRY_NAME, IDENTITY_SOURCE_SKIPS, expoNativeEntryUrl, isStringRecord, isPlistArray, published, lookups, answers;
|
|
106292
106424
|
var init_expo_native_prebuilt = __esm({
|
|
106293
106425
|
"src/expo-native-prebuilt.ts"() {
|
|
106294
106426
|
"use strict";
|
|
106295
106427
|
import_node_crypto65 = require("node:crypto");
|
|
106296
|
-
|
|
106428
|
+
import_node_fs109 = __toESM(require("node:fs"), 1);
|
|
106297
106429
|
import_node_module13 = require("node:module");
|
|
106298
|
-
|
|
106430
|
+
import_node_path111 = __toESM(require("node:path"), 1);
|
|
106299
106431
|
import_node_util14 = require("node:util");
|
|
106300
106432
|
init_answeredNativePackages();
|
|
106301
106433
|
init_expo_native_compiler_digest();
|
|
@@ -106323,8 +106455,8 @@ var init_expo_native_prebuilt = __esm({
|
|
|
106323
106455
|
|
|
106324
106456
|
// src/native-preparation.ts
|
|
106325
106457
|
function ignoredChange(relative7) {
|
|
106326
|
-
const parts2 = relative7.split(
|
|
106327
|
-
return relative7 ===
|
|
106458
|
+
const parts2 = relative7.split(import_node_path112.default.sep);
|
|
106459
|
+
return relative7 === import_node_path112.default.join(".git", "index") || parts2.includes(".cache") || parts2.includes(".expo") || /(?:^|[\\/])node_modules[\\/]expo-widgets[\\/]bundle[\\/]build(?:[\\/]|$)/.test(
|
|
106328
106460
|
relative7
|
|
106329
106461
|
);
|
|
106330
106462
|
}
|
|
@@ -106346,7 +106478,7 @@ function watchNativeInputs(root) {
|
|
|
106346
106478
|
}
|
|
106347
106479
|
const inputs2 = { expiry, revision: (0, import_node_crypto66.randomUUID)() };
|
|
106348
106480
|
const watch4 = (directory2, recursive, name3) => {
|
|
106349
|
-
const watcher =
|
|
106481
|
+
const watcher = import_node_fs110.default.watch(
|
|
106350
106482
|
directory2,
|
|
106351
106483
|
{ recursive, persistent: false },
|
|
106352
106484
|
(_event, file) => {
|
|
@@ -106359,17 +106491,17 @@ function watchNativeInputs(root) {
|
|
|
106359
106491
|
const scan3 = (directory2, watchRoot2) => {
|
|
106360
106492
|
if (visited.has(directory2)) return;
|
|
106361
106493
|
visited.add(directory2);
|
|
106362
|
-
for (const entry of
|
|
106363
|
-
const file =
|
|
106364
|
-
if (ignoredChange(
|
|
106494
|
+
for (const entry of import_node_fs110.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
106495
|
+
const file = import_node_path112.default.join(directory2, entry.name);
|
|
106496
|
+
if (ignoredChange(import_node_path112.default.relative(watchRoot2, file)) || entry.name === ".git") continue;
|
|
106365
106497
|
if (entry.isDirectory()) scan3(file, watchRoot2);
|
|
106366
106498
|
if (!entry.isSymbolicLink()) continue;
|
|
106367
|
-
const target =
|
|
106368
|
-
if (target === workspace || target.startsWith(workspace +
|
|
106369
|
-
const real =
|
|
106499
|
+
const target = import_node_path112.default.resolve(directory2, import_node_fs110.default.readlinkSync(file));
|
|
106500
|
+
if (target === workspace || target.startsWith(workspace + import_node_path112.default.sep)) continue;
|
|
106501
|
+
const real = import_node_fs110.default.realpathSync(file);
|
|
106370
106502
|
if (visited.has(real)) continue;
|
|
106371
|
-
watch4(
|
|
106372
|
-
if (
|
|
106503
|
+
watch4(import_node_path112.default.dirname(real), false, import_node_path112.default.basename(real));
|
|
106504
|
+
if (import_node_fs110.default.statSync(real).isDirectory()) {
|
|
106373
106505
|
watch4(real, true);
|
|
106374
106506
|
scan3(real, real);
|
|
106375
106507
|
} else visited.add(real);
|
|
@@ -106389,13 +106521,13 @@ function nativeInputRevision(root) {
|
|
|
106389
106521
|
const inputs2 = watchNativeInputs(root);
|
|
106390
106522
|
if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
|
|
106391
106523
|
}
|
|
106392
|
-
var import_node_crypto66,
|
|
106524
|
+
var import_node_crypto66, import_node_fs110, import_node_path112, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
106393
106525
|
var init_native_preparation = __esm({
|
|
106394
106526
|
"src/native-preparation.ts"() {
|
|
106395
106527
|
"use strict";
|
|
106396
106528
|
import_node_crypto66 = require("node:crypto");
|
|
106397
|
-
|
|
106398
|
-
|
|
106529
|
+
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
106530
|
+
import_node_path112 = __toESM(require("node:path"), 1);
|
|
106399
106531
|
import_node_timers2 = require("node:timers");
|
|
106400
106532
|
init_nativePreparationContract();
|
|
106401
106533
|
init_runtime_assets();
|
|
@@ -106459,87 +106591,6 @@ var init_native_preparation = __esm({
|
|
|
106459
106591
|
}
|
|
106460
106592
|
});
|
|
106461
106593
|
|
|
106462
|
-
// src/swift-xcframework.ts
|
|
106463
|
-
function simulatorNativeLibrary(dir) {
|
|
106464
|
-
if (dir.endsWith(".framework")) {
|
|
106465
|
-
const name3 = import_node_path112.default.basename(dir, ".framework");
|
|
106466
|
-
return { name: name3, file: import_node_path112.default.join(dir, name3), kind: "framework" };
|
|
106467
|
-
}
|
|
106468
|
-
if (!dir.endsWith(".xcframework")) return null;
|
|
106469
|
-
const info = parsePlistBytes(import_node_fs110.default.readFileSync(import_node_path112.default.join(dir, "Info.plist")));
|
|
106470
|
-
if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
|
|
106471
|
-
throw new Error(`${dir}: invalid XCFramework library declarations`);
|
|
106472
|
-
const matches = [];
|
|
106473
|
-
for (const entry of info.AvailableLibraries) {
|
|
106474
|
-
if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
|
|
106475
|
-
if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
|
|
106476
|
-
continue;
|
|
106477
|
-
if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
|
|
106478
|
-
throw new Error(`${dir}: invalid simulator library paths`);
|
|
106479
|
-
const archive = /\.a$/.test(entry.LibraryPath);
|
|
106480
|
-
const framework = /\.framework$/.test(entry.LibraryPath);
|
|
106481
|
-
if (!archive && !framework) continue;
|
|
106482
|
-
const bundle = import_node_path112.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
|
|
106483
|
-
const bundleRelative = import_node_path112.default.relative(dir, bundle);
|
|
106484
|
-
if (bundleRelative.startsWith("..") || import_node_path112.default.isAbsolute(bundleRelative))
|
|
106485
|
-
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
106486
|
-
let name3 = entry.LibraryPath;
|
|
106487
|
-
let file = bundle;
|
|
106488
|
-
if (framework) {
|
|
106489
|
-
name3 = import_node_path112.default.basename(bundle, ".framework");
|
|
106490
|
-
file = import_node_path112.default.join(bundle, name3);
|
|
106491
|
-
}
|
|
106492
|
-
const relative7 = import_node_path112.default.relative(dir, file);
|
|
106493
|
-
if (relative7.startsWith("..") || import_node_path112.default.isAbsolute(relative7))
|
|
106494
|
-
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
106495
|
-
if (framework) {
|
|
106496
|
-
matches.push({ name: name3, file, kind: "framework" });
|
|
106497
|
-
continue;
|
|
106498
|
-
}
|
|
106499
|
-
const slice = import_node_path112.default.resolve(dir, entry.LibraryIdentifier);
|
|
106500
|
-
const headers = typeof entry.HeadersPath === "string" ? import_node_path112.default.resolve(slice, entry.HeadersPath) : void 0;
|
|
106501
|
-
if (headers && relativeInside(slice, headers) === null)
|
|
106502
|
-
throw new Error(`${dir}: headers escape their XCFramework slice`);
|
|
106503
|
-
matches.push({ name: name3, file, kind: "archive", headers });
|
|
106504
|
-
}
|
|
106505
|
-
if (matches.length === 0) return null;
|
|
106506
|
-
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
106507
|
-
return matches[0];
|
|
106508
|
-
}
|
|
106509
|
-
function isDynamicLibrary2(file) {
|
|
106510
|
-
const fd = import_node_fs110.default.openSync(file, "r");
|
|
106511
|
-
try {
|
|
106512
|
-
const read2 = (offset) => {
|
|
106513
|
-
const bytes = Buffer.alloc(16);
|
|
106514
|
-
import_node_fs110.default.readSync(fd, bytes, 0, 16, offset);
|
|
106515
|
-
return bytes;
|
|
106516
|
-
};
|
|
106517
|
-
let header = read2(0);
|
|
106518
|
-
const universal = header.readUInt32BE(0);
|
|
106519
|
-
if (universal === 3405691582 || universal === 3405691583) {
|
|
106520
|
-
const arch = read2(8);
|
|
106521
|
-
header = read2(
|
|
106522
|
-
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
106523
|
-
);
|
|
106524
|
-
}
|
|
106525
|
-
const magic = header.readUInt32LE(0);
|
|
106526
|
-
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
106527
|
-
} finally {
|
|
106528
|
-
import_node_fs110.default.closeSync(fd);
|
|
106529
|
-
}
|
|
106530
|
-
}
|
|
106531
|
-
var import_node_fs110, import_node_path112;
|
|
106532
|
-
var init_swift_xcframework = __esm({
|
|
106533
|
-
"src/swift-xcframework.ts"() {
|
|
106534
|
-
"use strict";
|
|
106535
|
-
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
106536
|
-
import_node_path112 = __toESM(require("node:path"), 1);
|
|
106537
|
-
init_is_record();
|
|
106538
|
-
init_plist_bytes();
|
|
106539
|
-
init_swift_source_file();
|
|
106540
|
-
}
|
|
106541
|
-
});
|
|
106542
|
-
|
|
106543
106594
|
// src/native-static-libraries.ts
|
|
106544
106595
|
function nonmodularFrameworkLibraries(directories, moduleRoot) {
|
|
106545
106596
|
return [
|
|
@@ -124447,6 +124498,7 @@ __export(swift_host_exports, {
|
|
|
124447
124498
|
nativeSourceFiles: () => nativeSourceFiles,
|
|
124448
124499
|
openSwiftFile: () => openSwiftFile,
|
|
124449
124500
|
openXcodeProject: () => openXcodeProject,
|
|
124501
|
+
prepareSwiftSdkEntryAssets: () => prepareSwiftSdkEntryAssets,
|
|
124450
124502
|
prepareXcodeSwiftPackages: () => prepareXcodeSwiftPackages,
|
|
124451
124503
|
projectFor: () => projectFor,
|
|
124452
124504
|
serveSwiftPackageAsset: () => serveSwiftPackageAsset,
|
|
@@ -127315,6 +127367,17 @@ function swiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
|
127315
127367
|
sdkBindingUrl: `${origin}${SDK_BINDING_PATH}${servedSdkBinding(image.sdk, published4?.dataPlan ?? sdkDigest)}.bin`
|
|
127316
127368
|
};
|
|
127317
127369
|
}
|
|
127370
|
+
async function prepareSwiftSdkEntryAssets(origin, image, sdkDigest = image.sdk?.sha256) {
|
|
127371
|
+
if (image.sdk && !image.hostedSdk) {
|
|
127372
|
+
const published4 = publishedSwiftSdk(image.sdk.sha256);
|
|
127373
|
+
if (published4?.dataPlan) {
|
|
127374
|
+
const { fetchSwiftSdkDataPlan: fetchSwiftSdkDataPlan2 } = await Promise.resolve().then(() => (init_swift_sdk_later_data(), swift_sdk_later_data_exports));
|
|
127375
|
+
const plan = await fetchSwiftSdkDataPlan2(published4);
|
|
127376
|
+
if (plan) await splitSdkBinding(image.sdk, published4.dataPlan, plan);
|
|
127377
|
+
}
|
|
127378
|
+
}
|
|
127379
|
+
return swiftSdkEntryAssets(origin, image, sdkDigest);
|
|
127380
|
+
}
|
|
127318
127381
|
function swiftSdkStartup(sdk2, packagePath, artifactHash, metadata, launch2, runtimeRootOverride) {
|
|
127319
127382
|
const { key: key2 } = sdk2;
|
|
127320
127383
|
const normalizedPackage = normalizedSwiftPackagePath(packagePath);
|
|
@@ -128320,7 +128383,7 @@ var init_installed_native_libraries = __esm({
|
|
|
128320
128383
|
// src/turbo-codegen-intake.ts
|
|
128321
128384
|
function installedRendererDependencyGlobs(reactNativeRoot, appRoot) {
|
|
128322
128385
|
return Object.fromEntries(
|
|
128323
|
-
|
|
128386
|
+
RENDERER_DEPENDENCY_PODS.map((name3) => {
|
|
128324
128387
|
const spec = loadPodspec(
|
|
128325
128388
|
import_node_path140.default.join(reactNativeRoot, "third-party-podspecs", `${name3}.podspec`),
|
|
128326
128389
|
appRoot
|
|
@@ -128438,7 +128501,7 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
128438
128501
|
files: hashTree(generatedRoot)
|
|
128439
128502
|
};
|
|
128440
128503
|
}
|
|
128441
|
-
var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run12, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
128504
|
+
var import_node_child_process68, import_node_crypto83, import_node_fs138, import_node_module17, import_node_path140, import_node_util17, run12, RENDERER_DEPENDENCY_PODS, RENDERER_PODS, RENDERER_PODS_VERSIONED, COMPILED_SOURCE, LEGACY_BRIDGE_DEV_SUPPORT, LEGACY_BRIDGE_PODS, LEGACY_BRIDGE_PODS_VERSIONED;
|
|
128442
128505
|
var init_turbo_codegen_intake = __esm({
|
|
128443
128506
|
"src/turbo-codegen-intake.ts"() {
|
|
128444
128507
|
"use strict";
|
|
@@ -128453,6 +128516,7 @@ var init_turbo_codegen_intake = __esm({
|
|
|
128453
128516
|
init_nitro_source();
|
|
128454
128517
|
init_podspec_sources();
|
|
128455
128518
|
run12 = (0, import_node_util17.promisify)(import_node_child_process68.execFile);
|
|
128519
|
+
RENDERER_DEPENDENCY_PODS = ["RCT-Folly", "DoubleConversion", "fmt"];
|
|
128456
128520
|
RENDERER_PODS = /* @__PURE__ */ new Set([
|
|
128457
128521
|
"React-Fabric",
|
|
128458
128522
|
"React-FabricComponents",
|
|
@@ -128935,8 +128999,7 @@ function podspecDependencies(pod) {
|
|
|
128935
128999
|
if (!Array.isArray(requirements) || !requirements.every((item) => typeof item === "string"))
|
|
128936
129000
|
throw new Error(`${pod.file}: invalid requirements for ${name3}`);
|
|
128937
129001
|
const [root, ...subspec] = name3.split("/");
|
|
128938
|
-
if (root === pod.name ||
|
|
128939
|
-
continue;
|
|
129002
|
+
if (root === pod.name || reactNativePod(root)) continue;
|
|
128940
129003
|
const dep = deps.get(root) ?? { name: root, requirements: [], subspecs: [] };
|
|
128941
129004
|
dep.requirements.push(...requirements);
|
|
128942
129005
|
dep.subspecs.push(subspec.join("/"));
|
|
@@ -129524,7 +129587,7 @@ async function collectTurboSources(options2) {
|
|
|
129524
129587
|
...folly.defines
|
|
129525
129588
|
];
|
|
129526
129589
|
const defines = [...baseDefines, "RCT_NEW_ARCH_ENABLED=1", "RCT_REMOVE_LEGACY_ARCH=1"];
|
|
129527
|
-
const target = (name3, dependencies) => ({
|
|
129590
|
+
const target = (name3, dependencies, cxxDefines = defines) => ({
|
|
129528
129591
|
name: name3,
|
|
129529
129592
|
path: targetPath(name3),
|
|
129530
129593
|
executable: false,
|
|
@@ -129535,7 +129598,7 @@ async function collectTurboSources(options2) {
|
|
|
129535
129598
|
kind: "target",
|
|
129536
129599
|
name: dependency
|
|
129537
129600
|
})),
|
|
129538
|
-
cxxDefines
|
|
129601
|
+
cxxDefines
|
|
129539
129602
|
});
|
|
129540
129603
|
const result = {
|
|
129541
129604
|
coreMode: "turbo-cxx",
|
|
@@ -129589,6 +129652,9 @@ async function collectTurboSources(options2) {
|
|
|
129589
129652
|
const installedTargets = workspace && !options2.reactNativeCore && !options2.reactNativeProvider ? readXcodeAppTarget(workspace, void 0, "Release", {
|
|
129590
129653
|
installedPods: true
|
|
129591
129654
|
}).frameworks : [];
|
|
129655
|
+
const installedByIdentity = new Map(
|
|
129656
|
+
installedTargets.map((target2) => [target2.targetIdentity, target2])
|
|
129657
|
+
);
|
|
129592
129658
|
const fileFlags = new Map(
|
|
129593
129659
|
installedTargets.flatMap(
|
|
129594
129660
|
(target2) => Object.entries(target2.objc?.fileFlags ?? {}).map(
|
|
@@ -129740,6 +129806,18 @@ async function collectTurboSources(options2) {
|
|
|
129740
129806
|
const podHeaders = /* @__PURE__ */ new Map();
|
|
129741
129807
|
const podFileLists = /* @__PURE__ */ new Map();
|
|
129742
129808
|
const isHeaderFile = (file) => import_node_fs139.default.statSync(file, { throwIfNoEntry: false })?.isFile() ?? false;
|
|
129809
|
+
const installedDependencyHeader = (from, root, relative7) => {
|
|
129810
|
+
const provider = podHeaders.get(from.targetName);
|
|
129811
|
+
const providerFile = provider ? relativeInside(provider.root, import_node_path141.default.join(root, relative7)) : null;
|
|
129812
|
+
if (provider && providerFile !== null)
|
|
129813
|
+
return original(from.targetName, provider.label, provider.root, providerFile, false);
|
|
129814
|
+
for (const pod of installedHeaderPods) {
|
|
129815
|
+
const directory2 = relativeInside(options2.appRoot, pod.root);
|
|
129816
|
+
const file = directory2 === null ? null : relativeInside(directory2, relative7);
|
|
129817
|
+
if (file !== null) return original(from.targetName, pod.name, pod.root, file, false);
|
|
129818
|
+
}
|
|
129819
|
+
return original(from.targetName, "installed-dependency", root, relative7, false);
|
|
129820
|
+
};
|
|
129743
129821
|
const resolve16 = (from, include, quoted2) => {
|
|
129744
129822
|
if (quoted2) {
|
|
129745
129823
|
const relative7 = import_node_path141.default.posix.normalize(
|
|
@@ -129887,15 +129965,7 @@ async function collectTurboSources(options2) {
|
|
|
129887
129965
|
] : pod?.dependencyHeaderMaps.filter(({ flag }) => flag === "-I") ?? []) {
|
|
129888
129966
|
const relative7 = map2.headers.get(include);
|
|
129889
129967
|
if (relative7 === void 0) continue;
|
|
129890
|
-
|
|
129891
|
-
const root = relativeInside(options2.appRoot, candidate.root);
|
|
129892
|
-
const file = root === null ? null : relativeInside(root, relative7);
|
|
129893
|
-
return file === null ? [] : [{ pod: candidate, file }];
|
|
129894
|
-
})[0];
|
|
129895
|
-
alias(
|
|
129896
|
-
own2,
|
|
129897
|
-
owner ? original(from.targetName, owner.pod.name, owner.pod.root, owner.file, false) : original(from.targetName, "installed-dependency", map2.root, relative7, false)
|
|
129898
|
-
);
|
|
129968
|
+
alias(own2, installedDependencyHeader(from, map2.root, relative7));
|
|
129899
129969
|
return;
|
|
129900
129970
|
}
|
|
129901
129971
|
for (const search of pod?.dependencySearchPaths ?? []) {
|
|
@@ -129905,10 +129975,7 @@ async function collectTurboSources(options2) {
|
|
|
129905
129975
|
const relative7 = relativeInside(search.root, file);
|
|
129906
129976
|
if (relative7 === null)
|
|
129907
129977
|
throw new Error("installed dependency header escapes its workspace: " + candidate);
|
|
129908
|
-
alias(
|
|
129909
|
-
own2,
|
|
129910
|
-
original(from.targetName, "installed-dependency", search.root, relative7, false)
|
|
129911
|
-
);
|
|
129978
|
+
alias(own2, installedDependencyHeader(from, search.root, relative7));
|
|
129912
129979
|
return;
|
|
129913
129980
|
}
|
|
129914
129981
|
resolveDependency(include);
|
|
@@ -130025,16 +130092,18 @@ async function collectTurboSources(options2) {
|
|
|
130025
130092
|
for (const provider of providers) {
|
|
130026
130093
|
const targetName = providerTarget(provider.info.name);
|
|
130027
130094
|
const label = provider.info.name;
|
|
130028
|
-
const
|
|
130029
|
-
|
|
130030
|
-
|
|
130095
|
+
const providerDefines = provider.paper ? baseDefines : defines;
|
|
130096
|
+
const providerTargetInput = target(
|
|
130097
|
+
targetName,
|
|
130098
|
+
[TURBO_CORE_TARGET],
|
|
130099
|
+
providerDefines
|
|
130100
|
+
);
|
|
130031
130101
|
result.targets.push(providerTargetInput);
|
|
130032
130102
|
const pod = readPod(
|
|
130033
130103
|
provider,
|
|
130034
130104
|
options2.appRoot,
|
|
130035
130105
|
options2.installedPods?.get(provider.name)
|
|
130036
130106
|
);
|
|
130037
|
-
if (provider.paper) providerTargetInput.cxxDefines = baseDefines;
|
|
130038
130107
|
if (pod.installed)
|
|
130039
130108
|
providerTargetInput.clangSettings = [
|
|
130040
130109
|
{ tool: "c", flags: pod.installed.preprocessorFlags.c },
|
|
@@ -130175,7 +130244,9 @@ async function collectTurboSources(options2) {
|
|
|
130175
130244
|
const depUnits = [];
|
|
130176
130245
|
const depSwiftPods = [];
|
|
130177
130246
|
const externalDefines = [];
|
|
130178
|
-
|
|
130247
|
+
const dependencies = podspecDependencies(pod);
|
|
130248
|
+
const seenDependencies = /* @__PURE__ */ new Set([pod.name, ...dependencies.map(({ name: name3 }) => name3)]);
|
|
130249
|
+
for (const dep of dependencies) {
|
|
130179
130250
|
const installed2 = installedHeaderPods.find(
|
|
130180
130251
|
(candidate) => candidate.name === dep.name
|
|
130181
130252
|
);
|
|
@@ -130209,6 +130280,13 @@ async function collectTurboSources(options2) {
|
|
|
130209
130280
|
if (!resolved) continue;
|
|
130210
130281
|
if (provider.reactModulesOnly && resolved.files.some((f) => f.endsWith(".swift")))
|
|
130211
130282
|
continue;
|
|
130283
|
+
for (const identity2 of installedTarget?.targetDependencies ?? []) {
|
|
130284
|
+
const dependency = installedByIdentity.get(identity2);
|
|
130285
|
+
if (!dependency?.podRoot || seenDependencies.has(dependency.name) || reactNativePod(dependency.name))
|
|
130286
|
+
continue;
|
|
130287
|
+
seenDependencies.add(dependency.name);
|
|
130288
|
+
dependencies.push({ name: dependency.name, requirements: [], subspecs: [""] });
|
|
130289
|
+
}
|
|
130212
130290
|
externalDefines.push(...resolved.defines);
|
|
130213
130291
|
const mappings2 = installed2 ? podHeaderMappings(installed2) : [];
|
|
130214
130292
|
const swiftFilesForDep = [];
|
|
@@ -130286,7 +130364,8 @@ async function collectTurboSources(options2) {
|
|
|
130286
130364
|
result.targets.push({
|
|
130287
130365
|
...target(
|
|
130288
130366
|
swiftModule,
|
|
130289
|
-
depSwiftPods.map((dep) => dep.moduleName)
|
|
130367
|
+
depSwiftPods.map((dep) => dep.moduleName),
|
|
130368
|
+
providerDefines
|
|
130290
130369
|
),
|
|
130291
130370
|
cxxInterop: true
|
|
130292
130371
|
});
|
|
@@ -132746,7 +132825,7 @@ extern "C" __attribute__((export_name("peach_fabric_component_names"))) const ch
|
|
|
132746
132825
|
}
|
|
132747
132826
|
`;
|
|
132748
132827
|
}
|
|
132749
|
-
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;
|
|
132828
|
+
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;
|
|
132750
132829
|
var init_turbo_source = __esm({
|
|
132751
132830
|
"src/turbo-source.ts"() {
|
|
132752
132831
|
"use strict";
|
|
@@ -132882,6 +132961,21 @@ var init_turbo_source = __esm({
|
|
|
132882
132961
|
EXPORTED_MODULE = /\bRCT_(?:EXPORT_MODULE(?:_NO_LOAD)?|EXTERN_MODULE)\s*\(\s*(\w*)/g;
|
|
132883
132962
|
sha2564 = (data) => (0, import_node_crypto84.createHash)("sha256").update(data).digest("hex");
|
|
132884
132963
|
podspecList = podspecAttribute;
|
|
132964
|
+
reactNativePods = /* @__PURE__ */ new Set([
|
|
132965
|
+
"React",
|
|
132966
|
+
"ReactCommon",
|
|
132967
|
+
"ReactCodegen",
|
|
132968
|
+
"ReactNativeDependencies",
|
|
132969
|
+
"hermes-engine",
|
|
132970
|
+
"FBLazyVector",
|
|
132971
|
+
"DoubleConversion",
|
|
132972
|
+
"glog",
|
|
132973
|
+
"boost",
|
|
132974
|
+
"fmt",
|
|
132975
|
+
"fast_float",
|
|
132976
|
+
"Yoga"
|
|
132977
|
+
]);
|
|
132978
|
+
reactNativePod = (name3) => reactNativePods.has(name3) || name3.startsWith("React-") || name3.startsWith("RCT");
|
|
132885
132979
|
versionParts = (version2) => version2.split(/[.-]/).map((p) => Number(p) || 0);
|
|
132886
132980
|
iosOf = (member) => object7(member.ios) ? member.ios : null;
|
|
132887
132981
|
JS_CALL_INVOKER = `namespace {
|
|
@@ -134336,7 +134430,7 @@ var init_react_native_core = __esm({
|
|
|
134336
134430
|
init_swift_distribution();
|
|
134337
134431
|
init_swift_package();
|
|
134338
134432
|
init_swiftContract();
|
|
134339
|
-
recipe = true ? "
|
|
134433
|
+
recipe = true ? "db2c81d6628055a561c22667b098e4686f9d8924ffb229c4c7d9e15a25182502" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
134340
134434
|
strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
134341
134435
|
building = /* @__PURE__ */ new Map();
|
|
134342
134436
|
}
|
|
@@ -134858,6 +134952,9 @@ function retarget(cached5, base2) {
|
|
|
134858
134952
|
for (const module2 of result.modules) {
|
|
134859
134953
|
module2.url = replaceBase(module2.url, cached5.base, base2);
|
|
134860
134954
|
module2.icuUrl = replaceBase(module2.icuUrl, cached5.base, base2);
|
|
134955
|
+
if (module2.sdkUrl) module2.sdkUrl = replaceBase(module2.sdkUrl, cached5.base, base2);
|
|
134956
|
+
if (module2.sdkBindingUrl)
|
|
134957
|
+
module2.sdkBindingUrl = replaceBase(module2.sdkBindingUrl, cached5.base, base2);
|
|
134861
134958
|
}
|
|
134862
134959
|
return result;
|
|
134863
134960
|
}
|
|
@@ -134924,6 +135021,8 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
134924
135021
|
return originals.some((file) => import_node_fs144.default.realpathSync(file).startsWith(reactNativeRoot)) ? [target.name] : [];
|
|
134925
135022
|
})
|
|
134926
135023
|
);
|
|
135024
|
+
for (const name3 of RENDERER_DEPENDENCY_PODS)
|
|
135025
|
+
if (targetByName.has(name3)) reactTargets.add(name3);
|
|
134927
135026
|
for (const [file, source] of Object.entries(installed2.sourcePaths)) {
|
|
134928
135027
|
if (!file.endsWith(".swift") || !import_node_fs144.default.realpathSync(source).startsWith(reactNativeRoot))
|
|
134929
135028
|
continue;
|
|
@@ -134955,9 +135054,19 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
134955
135054
|
map2(file)
|
|
134956
135055
|
])
|
|
134957
135056
|
);
|
|
135057
|
+
const publishedFrameworkTargets = /* @__PURE__ */ new Set([...provided, ...reactTargets]);
|
|
135058
|
+
const frameworkQueue = [...publishedFrameworkTargets];
|
|
135059
|
+
while (frameworkQueue.length > 0) {
|
|
135060
|
+
const name3 = frameworkQueue.pop();
|
|
135061
|
+
for (const dependency of importedTargets.get(name3) ?? []) {
|
|
135062
|
+
if (publishedFrameworkTargets.has(dependency)) continue;
|
|
135063
|
+
publishedFrameworkTargets.add(dependency);
|
|
135064
|
+
frameworkQueue.push(dependency);
|
|
135065
|
+
}
|
|
135066
|
+
}
|
|
134958
135067
|
for (const target of input.nativeTargets ?? []) {
|
|
134959
135068
|
const runtimeModule = provided.has(target.name);
|
|
134960
|
-
if (!
|
|
135069
|
+
if (!publishedFrameworkTargets.has(target.name)) continue;
|
|
134961
135070
|
const swift = runtimeModule ? swiftModuleInterface(moduleRoot, target.name) : null;
|
|
134962
135071
|
const refineClangTypes = clangTypeOwnership(moduleRoot, target.name);
|
|
134963
135072
|
const interfaceName = `${target.name}-Swift.h`;
|
|
@@ -136335,7 +136444,6 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136335
136444
|
linkedLibraries.set(name3, library);
|
|
136336
136445
|
}
|
|
136337
136446
|
projectFor(packagePath).oneModule = false;
|
|
136338
|
-
projectFor(packagePath).standalone = true;
|
|
136339
136447
|
projectFor(packagePath).optimize = true;
|
|
136340
136448
|
projectFor(packagePath).staticClangTargets = provider?.staticClangTargets;
|
|
136341
136449
|
projectFor(packagePath).binaryModules = Object.fromEntries([
|
|
@@ -136671,8 +136779,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136671
136779
|
return prepared;
|
|
136672
136780
|
}
|
|
136673
136781
|
}
|
|
136674
|
-
const link = async (linked2) => {
|
|
136675
|
-
const packagePath = expoSwiftPackage(key2,
|
|
136782
|
+
const link = async (linked2, name3 = "linked-app") => {
|
|
136783
|
+
const packagePath = expoSwiftPackage(key2, name3);
|
|
136676
136784
|
preparePackage2(linked2, packagePath);
|
|
136677
136785
|
signal.throwIfAborted();
|
|
136678
136786
|
const stamp = sourceContentStamp(packagePath, module2.root);
|
|
@@ -136730,35 +136838,24 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136730
136838
|
error instanceof SwiftMissingModulesError ? [...message.matchAll(/^ (\S+)/gm)].map((match) => match[1]) : []
|
|
136731
136839
|
);
|
|
136732
136840
|
return pool.filter(
|
|
136733
|
-
(unit2) => [
|
|
136841
|
+
(unit2) => [
|
|
136842
|
+
...Object.keys(unit2.files),
|
|
136843
|
+
...expoUnitAppPaths(unit2),
|
|
136844
|
+
...(unit2.nativeTargets ?? []).flatMap(
|
|
136845
|
+
(native) => [native.bridgingHeader, native.prefixHeader].filter(
|
|
136846
|
+
(file) => file !== null
|
|
136847
|
+
)
|
|
136848
|
+
)
|
|
136849
|
+
].some(
|
|
136734
136850
|
(name3) => nativeCopies.includes(name3) || errorFiles.some((file) => file === name3 || file.endsWith(`/${name3}`))
|
|
136735
136851
|
) || Object.values(unit2.files).some(
|
|
136736
136852
|
(source) => swiftImportNames(source).some((name3) => missing2.has(name3))
|
|
136737
136853
|
)
|
|
136738
136854
|
);
|
|
136739
136855
|
};
|
|
136740
|
-
let checked = candidates;
|
|
136741
136856
|
linked = [];
|
|
136742
|
-
let
|
|
136743
|
-
|
|
136744
|
-
for (; ; ) {
|
|
136745
|
-
const named = namedBy(failure3, rest);
|
|
136746
|
-
if (named.length === 0 || named.length === rest.length) break;
|
|
136747
|
-
rest = rest.filter((unit2) => !named.includes(unit2));
|
|
136748
|
-
report(`linking ${rest.length} namespaces the diagnostic does not name`);
|
|
136749
|
-
try {
|
|
136750
|
-
artifact = await link(rest);
|
|
136751
|
-
linked = rest;
|
|
136752
|
-
checked = candidates.filter((unit2) => !rest.includes(unit2));
|
|
136753
|
-
break;
|
|
136754
|
-
} catch (error) {
|
|
136755
|
-
signal.throwIfAborted();
|
|
136756
|
-
if (error instanceof ExpoSwiftLinkRefusal) throw error;
|
|
136757
|
-
failure3 = error;
|
|
136758
|
-
}
|
|
136759
|
-
}
|
|
136760
|
-
const linkedWithoutChecks = linked.length;
|
|
136761
|
-
for (const unit2 of checked) {
|
|
136857
|
+
let isolatedArtifact;
|
|
136858
|
+
const check2 = async (unit2) => {
|
|
136762
136859
|
signal.throwIfAborted();
|
|
136763
136860
|
const packagePath = expoSwiftPackage(key2, unit2.moduleId);
|
|
136764
136861
|
preparePackage2([unit2], packagePath);
|
|
@@ -136808,9 +136905,43 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136808
136905
|
unitErrors.length ? unitErrors.join("\n") : diagnostic
|
|
136809
136906
|
);
|
|
136810
136907
|
}
|
|
136811
|
-
}
|
|
136908
|
+
};
|
|
136909
|
+
const isolate = async (group, failure3) => {
|
|
136910
|
+
const named = namedBy(failure3, group);
|
|
136911
|
+
if (group !== candidates)
|
|
136912
|
+
report(
|
|
136913
|
+
`${group.length} namespaces failed${named.length ? `, naming ${named.map((unit2) => unit2.moduleId).join(", ")}` : ""}: ${(failure3 instanceof Error ? failure3.message : String(failure3)).match(/^.+: error: .*$/m)?.[0] ?? "no source error"}`
|
|
136914
|
+
);
|
|
136915
|
+
const half = Math.ceil(group.length / 2);
|
|
136916
|
+
const parts2 = named.length > 0 && named.length < group.length ? [
|
|
136917
|
+
...named.map((unit2) => [unit2]),
|
|
136918
|
+
group.filter((unit2) => !named.includes(unit2))
|
|
136919
|
+
] : [group.slice(0, half), group.slice(half)];
|
|
136920
|
+
for (const part of parts2) {
|
|
136921
|
+
signal.throwIfAborted();
|
|
136922
|
+
if (part.length === 0) continue;
|
|
136923
|
+
if (part.length === 1) {
|
|
136924
|
+
await check2(part[0]);
|
|
136925
|
+
continue;
|
|
136926
|
+
}
|
|
136927
|
+
const name3 = (0, import_node_crypto88.createHash)("sha256").update(part.map((unit2) => unit2.moduleId).join("\0")).digest("hex").slice(0, 16);
|
|
136928
|
+
report(`linking ${part.length} namespaces to isolate failures`);
|
|
136929
|
+
try {
|
|
136930
|
+
const built2 = await link(part, `isolate-${name3}`);
|
|
136931
|
+
linked.push(...part);
|
|
136932
|
+
isolatedArtifact = { units: part, artifact: built2 };
|
|
136933
|
+
} catch (error) {
|
|
136934
|
+
signal.throwIfAborted();
|
|
136935
|
+
if (error instanceof ExpoSwiftLinkRefusal) throw error;
|
|
136936
|
+
await isolate(part, error);
|
|
136937
|
+
}
|
|
136938
|
+
}
|
|
136939
|
+
};
|
|
136940
|
+
await isolate(candidates, linkError);
|
|
136812
136941
|
if (linked.length === candidates.length) throw linkError;
|
|
136813
|
-
if (
|
|
136942
|
+
if (isolatedArtifact?.units.length === linked.length)
|
|
136943
|
+
artifact = isolatedArtifact.artifact;
|
|
136944
|
+
else if (linked.length) {
|
|
136814
136945
|
try {
|
|
136815
136946
|
artifact = await link(linked);
|
|
136816
136947
|
} catch (error) {
|
|
@@ -136840,10 +136971,12 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136840
136971
|
}
|
|
136841
136972
|
if (artifact) {
|
|
136842
136973
|
signal.throwIfAborted();
|
|
136974
|
+
const sdkAssets = await prepareSwiftSdkEntryAssets(base2, artifact);
|
|
136843
136975
|
await publishArtifact?.(artifact, signal);
|
|
136844
136976
|
result.modules.push({
|
|
136845
136977
|
namespaces: linked.map((unit2) => unit2.moduleId),
|
|
136846
136978
|
url: `${base2}/__peach/swift/${artifact.hash}.wasm`,
|
|
136979
|
+
...sdkAssets,
|
|
136847
136980
|
hash: artifact.hash,
|
|
136848
136981
|
icuUrl: icuUrl(base2, artifact),
|
|
136849
136982
|
rootId: `${key2}/Expo`,
|
|
@@ -137005,6 +137138,7 @@ var init_expo_swift_host = __esm({
|
|
|
137005
137138
|
init_swift_standins();
|
|
137006
137139
|
init_swift_submit();
|
|
137007
137140
|
init_swift_toolchain();
|
|
137141
|
+
init_turbo_codegen_intake();
|
|
137008
137142
|
init_turbo_source();
|
|
137009
137143
|
run13 = (0, import_node_util19.promisify)(import_node_child_process71.execFile);
|
|
137010
137144
|
scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
|
|
@@ -151491,7 +151625,7 @@ var init_nitro_superset = __esm({
|
|
|
151491
151625
|
init_nitroContract();
|
|
151492
151626
|
init_swift_standin_digest();
|
|
151493
151627
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
151494
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
151628
|
+
NITRO_COMPILER_DIGEST = true ? "744976c15724422db8f3bc8d1fdfdcf68c3f91b185210a50951930d2ea18c38e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
151495
151629
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
151496
151630
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
151497
151631
|
published3 = /* @__PURE__ */ new Map();
|
|
@@ -151569,7 +151703,10 @@ async function compileNitroApp(appRoot, origin, configure, moduleRoot, shared =
|
|
|
151569
151703
|
};
|
|
151570
151704
|
}
|
|
151571
151705
|
async function compiledModuleAssets(artifact) {
|
|
151572
|
-
const assets2 = await swiftArtifactAssets(
|
|
151706
|
+
const assets2 = await swiftArtifactAssets(
|
|
151707
|
+
artifact,
|
|
151708
|
+
await prepareSwiftSdkEntryAssets("", artifact)
|
|
151709
|
+
);
|
|
151573
151710
|
return [...assets2].map(([address, asset]) => ({ path: address.slice(1), ...asset }));
|
|
151574
151711
|
}
|
|
151575
151712
|
async function buildNitroBundle(appRoot, configuration2, moduleRoot, shared = true) {
|