peachsim 0.1.2680 → 0.1.2682
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 +905 -828
- 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-KFRNGPIS.mjs → acorn-V7B4X5PR.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-SAKCEYPB.mjs → chunk-3UQZATB5.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-2DSJ4Y2B.mjs → chunk-3VAFU4BM.mjs} +4 -4
- package/dist-lib/esm-chunks/{chunk-6FMJ3RGV.mjs → chunk-5SWSDDXC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-YOSTYBQ5.mjs → chunk-64UA6DQO.mjs} +3 -3
- package/dist-lib/esm-chunks/{chunk-63IRSGUP.mjs → chunk-6PSNFREM.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BRJ7ARFB.mjs → chunk-AXBK3CA4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-MA526IJY.mjs → chunk-BJHQOPWO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-BZZUMB6S.mjs → chunk-DU3VOY6S.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-UASVIFF4.mjs → chunk-EC5RY4HR.mjs} +2 -2
- package/dist-lib/esm-chunks/{chunk-SZLZ7MYO.mjs → chunk-EK36QRGX.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-AKMQQCL4.mjs → chunk-GNZDVDDX.mjs} +6 -6
- package/dist-lib/esm-chunks/{chunk-D7K24QPS.mjs → chunk-IOLISFIO.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-UTPHWDOY.mjs → chunk-KYIRROKJ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-5ZUDE2OE.mjs → chunk-LV55WJFQ.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-54DXR7XC.mjs → chunk-PE7HDZNI.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-HTM32XYI.mjs → chunk-R2WPUKVT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-NDNSEMKC.mjs → chunk-SZ5UPZE4.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-RXNQMOOQ.mjs → chunk-UTI6VCYT.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-ISLJJHL6.mjs → chunk-VTJTOL53.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-I567ROA6.mjs → chunk-X37OP27I.mjs} +14 -14
- package/dist-lib/esm-chunks/{chunk-YIBGV5BP.mjs → chunk-Y6WPXDCC.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-TTFIUXYS.mjs → chunk-YKGS4NSG.mjs} +5 -5
- package/dist-lib/esm-chunks/{chunk-X6TNJRLY.mjs → chunk-Z6R2HZIH.mjs} +1 -1
- package/dist-lib/esm-chunks/{chunk-S2R5CB3W.mjs → chunk-ZYD227CX.mjs} +1 -1
- package/dist-lib/esm-chunks/{metro-layout-parser-6ETCKA7E.mjs → metro-layout-parser-5RTSOQCS.mjs} +3 -3
- package/dist-lib/esm-chunks/{swift-package-prebuilt-GTSH3CYC.mjs → swift-package-prebuilt-EH5JIX6L.mjs} +12 -12
- package/dist-lib/esm-chunks/{swift-sdk-app-module-PUPJSKNY.mjs → swift-sdk-app-module-VHAOCBXW.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-YPS6TJTZ.mjs → swift-sdk-image-3NCWCGQZ.mjs} +16 -16
- package/dist-lib/esm-chunks/{swift-sdk-image-producer-5NMRH53W.mjs → swift-sdk-image-producer-5S4IKSJ2.mjs} +5 -5
- package/dist-lib/expo-swift-bundle.cjs +736 -659
- package/dist-lib/expo-swift-metadata.cjs +1 -1
- package/dist-lib/expo-swift-metadata.mjs +7 -7
- package/dist-lib/home-paths.cjs +1 -1
- package/dist-lib/host/bridge-host.cjs +741 -664
- package/dist-lib/host/fetch-proxy-handler.cjs +84 -81
- 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 +73 -71
- 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 +781 -704
- package/dist-lib/swift-compile.cjs +1 -1
- 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 +5 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +3 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/src/expo-swift-host.ts +73 -31
- package/src/swift-xcframework.ts +13 -7
- package/src/turbo-codegen-intake.ts +4 -1
- 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.2682 | (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: "7a60ab959af99bebbcef81dda2fe962c6eeb694ec491218da2b3b923a7e8e7a9", file: "node/cli-7a60ab959af99bebbcef81dda2fe962c6eeb694ec491218da2b3b923a7e8e7a9.cjs" };
|
|
30670
30670
|
}
|
|
30671
30671
|
});
|
|
30672
30672
|
|
|
@@ -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({
|
|
@@ -97861,7 +97861,7 @@ var init_provenance = __esm({
|
|
|
97861
97861
|
import_node_crypto57 = require("node:crypto");
|
|
97862
97862
|
import_node_fs98 = require("node:fs");
|
|
97863
97863
|
import_node_path99 = require("node:path");
|
|
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":"
|
|
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, ".."));
|
|
97865
97865
|
}
|
|
97866
97866
|
});
|
|
97867
97867
|
|
|
@@ -98991,6 +98991,92 @@ var init_xcode_assets = __esm({
|
|
|
98991
98991
|
}
|
|
98992
98992
|
});
|
|
98993
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
|
+
|
|
98994
99080
|
// src/intent-definition/system-types.ts
|
|
98995
99081
|
function systemIntentType(kind, name3) {
|
|
98996
99082
|
const hashes = kind === "Enum" ? systemEnumHashes : systemObjectHashes;
|
|
@@ -100598,17 +100684,17 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
100598
100684
|
throw new Error(`${definition2}: invalid intent code generation language ${language}`);
|
|
100599
100685
|
if (prefix) identifier(prefix);
|
|
100600
100686
|
if (module2) identifier(module2);
|
|
100601
|
-
const source =
|
|
100687
|
+
const source = import_node_fs102.default.readFileSync(definition2);
|
|
100602
100688
|
const key2 = (0, import_node_crypto60.createHash)("sha256").update(
|
|
100603
100689
|
JSON.stringify([intentCompilerRevision, definition2, prefix, language, module2])
|
|
100604
100690
|
).update("\0").update(source).digest("hex");
|
|
100605
|
-
const cache =
|
|
100606
|
-
const output =
|
|
100607
|
-
const localization = definition2.split(
|
|
100608
|
-
const compiledRelative =
|
|
100609
|
-
const compiled =
|
|
100610
|
-
const generated =
|
|
100611
|
-
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 };
|
|
100612
100698
|
let metadata;
|
|
100613
100699
|
let sources;
|
|
100614
100700
|
try {
|
|
@@ -100618,34 +100704,34 @@ function preparePortableIntent(definition2, derivedDirectory, prefix, language,
|
|
|
100618
100704
|
} catch (cause) {
|
|
100619
100705
|
throw new Error(`could not compile intent definition ${definition2}`, { cause });
|
|
100620
100706
|
}
|
|
100621
|
-
|
|
100622
|
-
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-"));
|
|
100623
100709
|
try {
|
|
100624
|
-
const sourceDirectory =
|
|
100625
|
-
const resource =
|
|
100626
|
-
|
|
100627
|
-
|
|
100628
|
-
|
|
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);
|
|
100629
100715
|
for (const [file, contents2] of sources)
|
|
100630
|
-
|
|
100716
|
+
import_node_fs102.default.writeFileSync(import_node_path103.default.join(sourceDirectory, file), contents2);
|
|
100631
100717
|
try {
|
|
100632
|
-
|
|
100718
|
+
import_node_fs102.default.renameSync(stage, output);
|
|
100633
100719
|
} catch (error) {
|
|
100634
|
-
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))
|
|
100635
100721
|
throw error;
|
|
100636
100722
|
}
|
|
100637
100723
|
return { compiled, generated };
|
|
100638
100724
|
} finally {
|
|
100639
|
-
|
|
100725
|
+
import_node_fs102.default.rmSync(stage, { recursive: true, force: true });
|
|
100640
100726
|
}
|
|
100641
100727
|
}
|
|
100642
|
-
var import_node_crypto60,
|
|
100728
|
+
var import_node_crypto60, import_node_fs102, import_node_path103, intentCompilerRevision;
|
|
100643
100729
|
var init_xcode_intents = __esm({
|
|
100644
100730
|
"src/xcode-intents.ts"() {
|
|
100645
100731
|
"use strict";
|
|
100646
100732
|
import_node_crypto60 = require("node:crypto");
|
|
100647
|
-
|
|
100648
|
-
|
|
100733
|
+
import_node_fs102 = __toESM(require("node:fs"), 1);
|
|
100734
|
+
import_node_path103 = __toESM(require("node:path"), 1);
|
|
100649
100735
|
init_fields();
|
|
100650
100736
|
init_metadata();
|
|
100651
100737
|
init_plist_reader();
|
|
@@ -100701,7 +100787,7 @@ function remoteVersionRequirement(entry) {
|
|
|
100701
100787
|
function readXcodeJsonProject(xcodeproj, source) {
|
|
100702
100788
|
const json = Bun.JSON5.parse(source);
|
|
100703
100789
|
if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
|
|
100704
|
-
const projectDir =
|
|
100790
|
+
const projectDir = import_node_path104.default.dirname(xcodeproj);
|
|
100705
100791
|
const objects = {};
|
|
100706
100792
|
let next = 0;
|
|
100707
100793
|
const add2 = (entry, id) => {
|
|
@@ -100714,7 +100800,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100714
100800
|
const base2 = /^<([A-Z]+)>\/(.*)$/.exec(raw2);
|
|
100715
100801
|
if (base2) {
|
|
100716
100802
|
if (base2[1] === "PROJECT")
|
|
100717
|
-
return { sourceTree: "<absolute>", path:
|
|
100803
|
+
return { sourceTree: "<absolute>", path: import_node_path104.default.join(projectDir, base2[2]) };
|
|
100718
100804
|
if (base2[1] === "PRODUCTS")
|
|
100719
100805
|
return { sourceTree: "BUILT_PRODUCTS_DIR", path: base2[2] };
|
|
100720
100806
|
return null;
|
|
@@ -100722,7 +100808,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100722
100808
|
const unescaped = raw2.replaceAll("\\<", "<");
|
|
100723
100809
|
if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
|
|
100724
100810
|
if (unescaped.startsWith("~")) return null;
|
|
100725
|
-
return groupDir === null ? null : { sourceTree: "<absolute>", path:
|
|
100811
|
+
return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path104.default.join(groupDir, unescaped) };
|
|
100726
100812
|
};
|
|
100727
100813
|
const memberships = [];
|
|
100728
100814
|
const folders = [];
|
|
@@ -100733,7 +100819,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100733
100819
|
const kind = text6(entry.kind) ?? "file-reference";
|
|
100734
100820
|
const raw2 = text6(entry.path) ?? "";
|
|
100735
100821
|
const located = raw2 === "" ? null : locate(raw2, parent.dir);
|
|
100736
|
-
const name3 = text6(entry.name) ??
|
|
100822
|
+
const name3 = text6(entry.name) ?? import_node_path104.default.basename(raw2);
|
|
100737
100823
|
const node = { id: "", name: name3, dir: null, parent, children: [] };
|
|
100738
100824
|
if (kind === "group" || kind === "variant-group" || kind === "version-group") {
|
|
100739
100825
|
node.dir = raw2 === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
|
|
@@ -100854,7 +100940,7 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
100854
100940
|
if (!isObject(entry)) continue;
|
|
100855
100941
|
const repository = text6(entry.repository);
|
|
100856
100942
|
const local = text6(entry.path);
|
|
100857
|
-
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$/, "");
|
|
100858
100944
|
const id = text6(entry.kind) === "local" && local !== void 0 ? add2({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add2({
|
|
100859
100945
|
isa: "XCRemoteSwiftPackageReference",
|
|
100860
100946
|
repositoryURL: repository ?? "",
|
|
@@ -101026,11 +101112,11 @@ function readXcodeJsonProject(xcodeproj, source) {
|
|
|
101026
101112
|
function isJsonObject(value) {
|
|
101027
101113
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
101028
101114
|
}
|
|
101029
|
-
var
|
|
101115
|
+
var import_node_path104, isObject, text6, items, PHASE_ISA;
|
|
101030
101116
|
var init_xcode_json_project = __esm({
|
|
101031
101117
|
"src/xcode-json-project.ts"() {
|
|
101032
101118
|
"use strict";
|
|
101033
|
-
|
|
101119
|
+
import_node_path104 = __toESM(require("node:path"), 1);
|
|
101034
101120
|
isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
101035
101121
|
text6 = (value) => typeof value === "string" ? value : void 0;
|
|
101036
101122
|
items = (value) => Array.isArray(value) ? value : [];
|
|
@@ -101112,27 +101198,27 @@ var init_xcode_swift_features = __esm({
|
|
|
101112
101198
|
|
|
101113
101199
|
// src/xcode-project.ts
|
|
101114
101200
|
function walkFiles(dir) {
|
|
101115
|
-
if (!
|
|
101201
|
+
if (!import_node_fs103.default.existsSync(dir)) return [];
|
|
101116
101202
|
const out = [];
|
|
101117
|
-
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))) {
|
|
101118
101204
|
if (entry.name.startsWith(".")) continue;
|
|
101119
|
-
const full =
|
|
101205
|
+
const full = import_node_path105.default.join(dir, entry.name);
|
|
101120
101206
|
if (entry.isDirectory()) out.push(...walkFiles(full));
|
|
101121
101207
|
else if (entry.isFile()) out.push(full);
|
|
101122
101208
|
}
|
|
101123
101209
|
return out;
|
|
101124
101210
|
}
|
|
101125
101211
|
function readXcconfig(file, read2) {
|
|
101126
|
-
if (read2.includes(file) || !
|
|
101212
|
+
if (read2.includes(file) || !import_node_fs103.default.existsSync(file)) return {};
|
|
101127
101213
|
read2.push(file);
|
|
101128
101214
|
const settings = {};
|
|
101129
|
-
for (const raw2 of
|
|
101215
|
+
for (const raw2 of import_node_fs103.default.readFileSync(file, "utf8").split("\n")) {
|
|
101130
101216
|
const line = raw2.replace(/\/\/.*$/, "").trim();
|
|
101131
101217
|
const include = /^#include\??\s+"([^"]+)"/.exec(line);
|
|
101132
101218
|
if (include) {
|
|
101133
101219
|
Object.assign(
|
|
101134
101220
|
settings,
|
|
101135
|
-
readXcconfig(
|
|
101221
|
+
readXcconfig(import_node_path105.default.resolve(import_node_path105.default.dirname(file), include[1]), read2)
|
|
101136
101222
|
);
|
|
101137
101223
|
continue;
|
|
101138
101224
|
}
|
|
@@ -101177,8 +101263,8 @@ function applyOperator(value, operator) {
|
|
|
101177
101263
|
return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
|
|
101178
101264
|
case "standardizepath":
|
|
101179
101265
|
if (value === ".") return value;
|
|
101180
|
-
if (
|
|
101181
|
-
return
|
|
101266
|
+
if (import_node_path105.default.posix.isAbsolute(value))
|
|
101267
|
+
return import_node_path105.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
|
|
101182
101268
|
return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
|
|
101183
101269
|
}
|
|
101184
101270
|
throw new Error(`unsupported build setting operator :${operator}`);
|
|
@@ -101187,22 +101273,22 @@ function decodeXml(text7) {
|
|
|
101187
101273
|
return text7.replaceAll(""", '"').replaceAll("'", "'").replaceAll("<", "<").replaceAll(">", ">").replaceAll("&", "&");
|
|
101188
101274
|
}
|
|
101189
101275
|
function workspaceReferences(workspace) {
|
|
101190
|
-
const data =
|
|
101191
|
-
if (!
|
|
101276
|
+
const data = import_node_path105.default.join(workspace, "contents.xcworkspacedata");
|
|
101277
|
+
if (!import_node_fs103.default.existsSync(data))
|
|
101192
101278
|
throw new Error(`${workspace} has no contents.xcworkspacedata`);
|
|
101193
|
-
const container =
|
|
101279
|
+
const container = import_node_path105.default.dirname(workspace);
|
|
101194
101280
|
const locate = (location, base2) => {
|
|
101195
101281
|
const colon = location.indexOf(":");
|
|
101196
101282
|
const kind = location.slice(0, colon);
|
|
101197
101283
|
const rest = location.slice(colon + 1);
|
|
101198
|
-
if (kind === "group") return
|
|
101199
|
-
if (kind === "container" || kind === "self") return
|
|
101200
|
-
if (kind === "absolute") return
|
|
101201
|
-
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}`);
|
|
101202
101288
|
};
|
|
101203
101289
|
const groups = [container];
|
|
101204
101290
|
const references = [];
|
|
101205
|
-
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)) {
|
|
101206
101292
|
if (closing) {
|
|
101207
101293
|
if (tag === "Group") groups.pop();
|
|
101208
101294
|
continue;
|
|
@@ -101216,29 +101302,29 @@ function workspaceReferences(workspace) {
|
|
|
101216
101302
|
return references;
|
|
101217
101303
|
}
|
|
101218
101304
|
function enclosingXcodeWorkspace(xcodeproj) {
|
|
101219
|
-
const project2 =
|
|
101220
|
-
for (let dir =
|
|
101221
|
-
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()) {
|
|
101222
101308
|
if (!name3.endsWith(".xcworkspace")) continue;
|
|
101223
|
-
const workspace =
|
|
101224
|
-
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;
|
|
101225
101311
|
if (workspaceReferences(workspace).some(
|
|
101226
|
-
(reference) =>
|
|
101312
|
+
(reference) => import_node_fs103.default.existsSync(reference) && import_node_fs103.default.realpathSync.native(reference) === project2
|
|
101227
101313
|
))
|
|
101228
101314
|
return workspace;
|
|
101229
101315
|
}
|
|
101230
|
-
if (
|
|
101316
|
+
if (import_node_fs103.default.existsSync(import_node_path105.default.join(dir, ".git")) || import_node_path105.default.dirname(dir) === dir) return null;
|
|
101231
101317
|
}
|
|
101232
101318
|
}
|
|
101233
101319
|
function findXcodeProject(input) {
|
|
101234
|
-
const resolved =
|
|
101320
|
+
const resolved = import_node_path105.default.resolve(input);
|
|
101235
101321
|
if (resolved.endsWith(".xcworkspace")) {
|
|
101236
|
-
return
|
|
101322
|
+
return import_node_path105.default.dirname(resolved).endsWith(".xcodeproj") ? import_node_path105.default.dirname(resolved) : resolved;
|
|
101237
101323
|
}
|
|
101238
101324
|
if (resolved.endsWith(".xcodeproj")) return resolved;
|
|
101239
101325
|
if (!isDirectory3(resolved)) return null;
|
|
101240
101326
|
for (const extension of [".xcworkspace", ".xcodeproj"]) {
|
|
101241
|
-
const found2 =
|
|
101327
|
+
const found2 = import_node_fs103.default.readdirSync(resolved).filter((name3) => name3.endsWith(extension)).sort();
|
|
101242
101328
|
if (found2.length > 1) {
|
|
101243
101329
|
if (extension === ".xcworkspace") {
|
|
101244
101330
|
const selected = selectXcodeWorkspace(resolved, found2);
|
|
@@ -101248,14 +101334,14 @@ function findXcodeProject(input) {
|
|
|
101248
101334
|
`${resolved} holds ${found2.length} ${extension} bundles (${found2.join(", ")}); pass one`
|
|
101249
101335
|
);
|
|
101250
101336
|
}
|
|
101251
|
-
if (found2.length === 1) return
|
|
101337
|
+
if (found2.length === 1) return import_node_path105.default.join(resolved, found2[0]);
|
|
101252
101338
|
}
|
|
101253
101339
|
return null;
|
|
101254
101340
|
}
|
|
101255
101341
|
function sameXcodeProject(reference, xcodeproj) {
|
|
101256
|
-
if (
|
|
101342
|
+
if (import_node_path105.default.normalize(reference) === import_node_path105.default.normalize(xcodeproj)) return true;
|
|
101257
101343
|
try {
|
|
101258
|
-
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);
|
|
101259
101345
|
} catch {
|
|
101260
101346
|
return false;
|
|
101261
101347
|
}
|
|
@@ -101263,38 +101349,38 @@ function sameXcodeProject(reference, xcodeproj) {
|
|
|
101263
101349
|
function selectXcodeWorkspace(directory2, workspaces) {
|
|
101264
101350
|
const sorted3 = [...workspaces].sort();
|
|
101265
101351
|
if (sorted3.length === 0) return null;
|
|
101266
|
-
if (sorted3.length === 1) return
|
|
101267
|
-
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();
|
|
101268
101354
|
if (xcodeprojs.length !== 1) return null;
|
|
101269
|
-
const app =
|
|
101355
|
+
const app = import_node_path105.default.join(directory2, xcodeprojs[0]);
|
|
101270
101356
|
const referencing = sorted3.filter((workspace) => {
|
|
101271
101357
|
try {
|
|
101272
|
-
return workspaceReferences(
|
|
101358
|
+
return workspaceReferences(import_node_path105.default.join(directory2, workspace)).some(
|
|
101273
101359
|
(reference) => sameXcodeProject(reference, app)
|
|
101274
101360
|
);
|
|
101275
101361
|
} catch {
|
|
101276
101362
|
return false;
|
|
101277
101363
|
}
|
|
101278
101364
|
});
|
|
101279
|
-
if (referencing.length === 1) return
|
|
101365
|
+
if (referencing.length === 1) return import_node_path105.default.join(directory2, referencing[0]);
|
|
101280
101366
|
if (referencing.length === 0) return null;
|
|
101281
|
-
const own2 = `${
|
|
101367
|
+
const own2 = `${import_node_path105.default.basename(app, ".xcodeproj")}.xcworkspace`;
|
|
101282
101368
|
const named = referencing.filter((workspace) => workspace === own2);
|
|
101283
|
-
return named.length === 1 ?
|
|
101369
|
+
return named.length === 1 ? import_node_path105.default.join(directory2, named[0]) : null;
|
|
101284
101370
|
}
|
|
101285
101371
|
function installedXcodeWorkspace(projectRoot) {
|
|
101286
|
-
const ios =
|
|
101287
|
-
if (!
|
|
101372
|
+
const ios = import_node_path105.default.join(projectRoot, "ios");
|
|
101373
|
+
if (!import_node_fs103.default.existsSync(ios)) return null;
|
|
101288
101374
|
return selectXcodeWorkspace(
|
|
101289
101375
|
ios,
|
|
101290
|
-
|
|
101376
|
+
import_node_fs103.default.readdirSync(ios).filter((name3) => name3.endsWith(".xcworkspace"))
|
|
101291
101377
|
);
|
|
101292
101378
|
}
|
|
101293
101379
|
function requireInstalledXcodeWorkspace(projectRoot, needed) {
|
|
101294
101380
|
const workspace = installedXcodeWorkspace(projectRoot);
|
|
101295
101381
|
if (!workspace)
|
|
101296
101382
|
throw new Error(
|
|
101297
|
-
`${needed} needs an installed pod workspace in ${
|
|
101383
|
+
`${needed} needs an installed pod workspace in ${import_node_path105.default.join(projectRoot, "ios")}`
|
|
101298
101384
|
);
|
|
101299
101385
|
return workspace;
|
|
101300
101386
|
}
|
|
@@ -101335,8 +101421,8 @@ function remotePackageRequirements(projects2) {
|
|
|
101335
101421
|
}
|
|
101336
101422
|
function xcodeProjectFile(xcodeproj) {
|
|
101337
101423
|
for (const name3 of ["project.pbxproj", "project.xcproj"]) {
|
|
101338
|
-
const file =
|
|
101339
|
-
if (
|
|
101424
|
+
const file = import_node_path105.default.join(xcodeproj, name3);
|
|
101425
|
+
if (import_node_fs103.default.existsSync(file)) return file;
|
|
101340
101426
|
}
|
|
101341
101427
|
return null;
|
|
101342
101428
|
}
|
|
@@ -101344,7 +101430,7 @@ function loadProject(xcodeproj) {
|
|
|
101344
101430
|
const projectFile = xcodeProjectFile(xcodeproj);
|
|
101345
101431
|
if (!projectFile)
|
|
101346
101432
|
throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
|
|
101347
|
-
const source =
|
|
101433
|
+
const source = import_node_fs103.default.readFileSync(projectFile, "utf8");
|
|
101348
101434
|
const digest3 = (0, import_node_crypto61.createHash)("sha256").update(source).digest("hex");
|
|
101349
101435
|
const cached5 = loaded3.get(projectFile);
|
|
101350
101436
|
if (cached5?.digest === digest3) return cached5.project;
|
|
@@ -101361,10 +101447,10 @@ function loadProject(xcodeproj) {
|
|
|
101361
101447
|
if (!project2 || project2.isa !== "PBXProject") {
|
|
101362
101448
|
throw new Error(`${projectFile} has no PBXProject root`);
|
|
101363
101449
|
}
|
|
101364
|
-
const projectDir =
|
|
101365
|
-
|
|
101450
|
+
const projectDir = import_node_fs103.default.realpathSync.native(
|
|
101451
|
+
import_node_path105.default.resolve(import_node_path105.default.dirname(xcodeproj), str2(project2.projectDirPath) ?? "")
|
|
101366
101452
|
);
|
|
101367
|
-
const resolvePath = xcodePathResolver(objects, projectDir,
|
|
101453
|
+
const resolvePath = xcodePathResolver(objects, projectDir, import_node_path105.default.join);
|
|
101368
101454
|
const result = {
|
|
101369
101455
|
xcodeproj,
|
|
101370
101456
|
projectFile,
|
|
@@ -101395,9 +101481,9 @@ function xcodeInstallationIdentity() {
|
|
|
101395
101481
|
if (process.platform !== "darwin") return null;
|
|
101396
101482
|
const selected = process.env.DEVELOPER_DIR || selectedDeveloperDir(true);
|
|
101397
101483
|
if (!selected) return null;
|
|
101398
|
-
const directory2 =
|
|
101484
|
+
const directory2 = import_node_path105.default.extname(selected) === ".app" ? import_node_path105.default.join(selected, "Contents", "Developer") : selected;
|
|
101399
101485
|
const versionFile = `${directory2}/../version.plist`;
|
|
101400
|
-
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;
|
|
101401
101487
|
return { directory: directory2, version: version2 };
|
|
101402
101488
|
}
|
|
101403
101489
|
function defaultConfiguration(project2) {
|
|
@@ -101417,7 +101503,7 @@ function expandValue(value, settings) {
|
|
|
101417
101503
|
return value;
|
|
101418
101504
|
}
|
|
101419
101505
|
function processedInfoPlist(name3, file, settings, settingKeys) {
|
|
101420
|
-
const source = file ? parsePlist(
|
|
101506
|
+
const source = file ? parsePlist(import_node_fs103.default.readFileSync(file, "utf8")) : {};
|
|
101421
101507
|
if (!source || typeof source !== "object" || Array.isArray(source) || source instanceof Date || Buffer.isBuffer(source))
|
|
101422
101508
|
throw new Error(`${name3} Info.plist must contain a dictionary`);
|
|
101423
101509
|
const info = {};
|
|
@@ -101457,8 +101543,8 @@ function targetSettings(ref, configuration2, builtins, options2 = {}, overrides
|
|
|
101457
101543
|
const relative7 = str2(config.baseConfigurationReferenceRelativePath);
|
|
101458
101544
|
const own2 = isDict(config.buildSettings) ? config.buildSettings : {};
|
|
101459
101545
|
const directory2 = anchor ? project2.resolvePath(anchor) : null;
|
|
101460
|
-
const baseFile = base2 ? project2.resolvePath(base2) : directory2 && relative7 ?
|
|
101461
|
-
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)))
|
|
101462
101548
|
throw new Error(
|
|
101463
101549
|
`Unable to open base configuration reference file '${baseFile ?? base2 ?? relative7 ?? anchor}'`
|
|
101464
101550
|
);
|
|
@@ -101552,10 +101638,10 @@ function hostMacroPluginFlags(flags) {
|
|
|
101552
101638
|
if (flags[index - 1] !== "-load-plugin-executable") return flag;
|
|
101553
101639
|
const separator = flag.lastIndexOf("#");
|
|
101554
101640
|
if (separator < 0) return flag;
|
|
101555
|
-
const root =
|
|
101556
|
-
const manifest =
|
|
101557
|
-
if (!
|
|
101558
|
-
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"));
|
|
101559
101645
|
if (!isRecord(pkg) || pkg.name !== "expo-modules-macros") return flag;
|
|
101560
101646
|
const macros = (0, import_node_module9.createRequire)(manifest)(root);
|
|
101561
101647
|
if (!isRecord(macros) || typeof macros.getScannerBinaryPath !== "function")
|
|
@@ -101573,26 +101659,26 @@ function scriptCommand(shell, script) {
|
|
|
101573
101659
|
return [executable, ...args, "-c", script];
|
|
101574
101660
|
}
|
|
101575
101661
|
function expandSearchPath(directory2, rules2) {
|
|
101576
|
-
if (
|
|
101662
|
+
if (import_node_path105.default.basename(directory2) !== "**") return [directory2];
|
|
101577
101663
|
const expanded = [];
|
|
101578
101664
|
const seen = /* @__PURE__ */ new Set();
|
|
101579
|
-
const queue2 = [
|
|
101665
|
+
const queue2 = [import_node_path105.default.dirname(directory2)];
|
|
101580
101666
|
for (let at = 0; at < queue2.length; at++) {
|
|
101581
101667
|
const current2 = queue2[at];
|
|
101582
101668
|
let real;
|
|
101583
101669
|
try {
|
|
101584
|
-
real =
|
|
101670
|
+
real = import_node_fs103.default.realpathSync.native(current2);
|
|
101585
101671
|
} catch {
|
|
101586
101672
|
continue;
|
|
101587
101673
|
}
|
|
101588
|
-
if (!
|
|
101674
|
+
if (!import_node_fs103.default.statSync(real).isDirectory() || seen.has(real)) continue;
|
|
101589
101675
|
seen.add(real);
|
|
101590
101676
|
expanded.push(current2);
|
|
101591
|
-
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)) {
|
|
101592
101678
|
if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
|
|
101593
101679
|
if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
|
|
101594
101680
|
continue;
|
|
101595
|
-
queue2.push(
|
|
101681
|
+
queue2.push(import_node_path105.default.join(current2, entry.name));
|
|
101596
101682
|
}
|
|
101597
101683
|
}
|
|
101598
101684
|
return expanded;
|
|
@@ -101603,7 +101689,7 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
101603
101689
|
const rules2 = recursiveSearchRules(settings);
|
|
101604
101690
|
const directories = new Set(
|
|
101605
101691
|
settingList(settings("LIBRARY_SEARCH_PATHS")).flatMap(
|
|
101606
|
-
(raw2) => expandSearchPath(
|
|
101692
|
+
(raw2) => expandSearchPath(import_node_path105.default.resolve(projectDir, expand(raw2, settings)), rules2)
|
|
101607
101693
|
)
|
|
101608
101694
|
);
|
|
101609
101695
|
const resolved = [];
|
|
@@ -101616,18 +101702,18 @@ function searchedLinkerFlags(projectDir, settings, libraryDirectories) {
|
|
|
101616
101702
|
}
|
|
101617
101703
|
let archive;
|
|
101618
101704
|
for (const directory2 of directories) {
|
|
101619
|
-
const file = (extension) =>
|
|
101705
|
+
const file = (extension) => import_node_path105.default.join(directory2, `lib${name3}.${extension}`);
|
|
101620
101706
|
const dylib = file("dylib");
|
|
101621
|
-
const parent =
|
|
101707
|
+
const parent = import_node_path105.default.dirname(dylib);
|
|
101622
101708
|
let present = libraryDirectories.get(parent);
|
|
101623
101709
|
if (present === void 0) {
|
|
101624
|
-
present =
|
|
101710
|
+
present = import_node_fs103.default.existsSync(parent);
|
|
101625
101711
|
libraryDirectories.set(parent, present);
|
|
101626
101712
|
}
|
|
101627
101713
|
if (!present) continue;
|
|
101628
|
-
if (
|
|
101714
|
+
if (import_node_fs103.default.existsSync(dylib) || import_node_fs103.default.existsSync(file("tbd"))) break;
|
|
101629
101715
|
const staticLibrary = file("a");
|
|
101630
|
-
if (!
|
|
101716
|
+
if (!import_node_fs103.default.existsSync(staticLibrary)) continue;
|
|
101631
101717
|
archive = staticLibrary;
|
|
101632
101718
|
break;
|
|
101633
101719
|
}
|
|
@@ -101724,7 +101810,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
|
|
|
101724
101810
|
for (const token of tokens2) {
|
|
101725
101811
|
if (token.startsWith("-")) break;
|
|
101726
101812
|
const file = resolve16(token);
|
|
101727
|
-
if (file?.endsWith(".xcassets")) catalogs.push(
|
|
101813
|
+
if (file?.endsWith(".xcassets")) catalogs.push(import_node_path105.default.resolve(projectDir, file));
|
|
101728
101814
|
}
|
|
101729
101815
|
}
|
|
101730
101816
|
return catalogs;
|
|
@@ -101769,14 +101855,14 @@ function shellCopies(script, settings, projectDir) {
|
|
|
101769
101855
|
if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
|
|
101770
101856
|
return [];
|
|
101771
101857
|
copies.push({
|
|
101772
|
-
from:
|
|
101773
|
-
to:
|
|
101858
|
+
from: import_node_path105.default.resolve(projectDir, operands[0]),
|
|
101859
|
+
to: import_node_path105.default.resolve(projectDir, operands[1])
|
|
101774
101860
|
});
|
|
101775
101861
|
}
|
|
101776
101862
|
return copies;
|
|
101777
101863
|
}
|
|
101778
101864
|
function fileListEntries(file, absolute) {
|
|
101779
|
-
return
|
|
101865
|
+
return import_node_fs103.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
|
|
101780
101866
|
}
|
|
101781
101867
|
function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
101782
101868
|
const { project: project2, target, id: targetId } = ref;
|
|
@@ -101790,17 +101876,17 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101790
101876
|
const copiedFiles = [];
|
|
101791
101877
|
let generatedInfoPlist = false;
|
|
101792
101878
|
const declaredInfoPlist = settings("INFOPLIST_FILE");
|
|
101793
|
-
const infoPlistOutput = declaredInfoPlist ?
|
|
101879
|
+
const infoPlistOutput = declaredInfoPlist ? import_node_path105.default.resolve(project2.projectDir, declaredInfoPlist) : null;
|
|
101794
101880
|
const isPreparedOutput = (file) => file === infoPlistOutput || options2.requireSources !== false && file.endsWith(".swift");
|
|
101795
101881
|
let absentSources = false;
|
|
101796
101882
|
if (options2.prepareGeneratedSources === true && options2.requireSources !== false)
|
|
101797
101883
|
project2.visitMembers(
|
|
101798
101884
|
targetId,
|
|
101799
|
-
xcodePathResolver(project2.objects, project2.projectDir,
|
|
101800
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
101801
|
-
|
|
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,
|
|
101802
101888
|
(file, kind) => {
|
|
101803
|
-
if (kind !== "header" && kind !== "resource" && !
|
|
101889
|
+
if (kind !== "header" && kind !== "resource" && !import_node_fs103.default.existsSync(file))
|
|
101804
101890
|
absentSources = true;
|
|
101805
101891
|
}
|
|
101806
101892
|
);
|
|
@@ -101819,7 +101905,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101819
101905
|
copiedFiles.push(
|
|
101820
101906
|
...shellCopies(str2(phase.shellScript) ?? "", settings, project2.projectDir)
|
|
101821
101907
|
);
|
|
101822
|
-
const absolute = (raw2) =>
|
|
101908
|
+
const absolute = (raw2) => import_node_path105.default.resolve(project2.projectDir, expand(raw2, settings));
|
|
101823
101909
|
const inputs2 = list(phase.inputPaths).map(absolute);
|
|
101824
101910
|
const outputs = list(phase.outputPaths).map(absolute);
|
|
101825
101911
|
const fileLists = /* @__PURE__ */ new Map();
|
|
@@ -101828,7 +101914,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101828
101914
|
kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
|
|
101829
101915
|
).map((raw2) => {
|
|
101830
101916
|
const file = absolute(raw2);
|
|
101831
|
-
if (!
|
|
101917
|
+
if (!import_node_fs103.default.existsSync(file)) {
|
|
101832
101918
|
return { file, entries: [] };
|
|
101833
101919
|
}
|
|
101834
101920
|
return { file, entries: fileListEntries(file, absolute) };
|
|
@@ -101849,14 +101935,14 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101849
101935
|
...fileLists.get("OUTPUT").map((item) => item.file)
|
|
101850
101936
|
];
|
|
101851
101937
|
if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
|
|
101852
|
-
for (const file of inputFiles) if (
|
|
101938
|
+
for (const file of inputFiles) if (import_node_fs103.default.existsSync(file)) projectInputs.add(file);
|
|
101853
101939
|
}
|
|
101854
101940
|
const undeclaredGenerator = absentSources && beforeSources && allOutputs.length === 0 && str2(phase.runOnlyForDeploymentPostprocessing) !== "1";
|
|
101855
101941
|
if (options2.prepareGeneratedSources === true && (allOutputs.some(isPreparedOutput) || undeclaredGenerator)) {
|
|
101856
|
-
const phaseDir =
|
|
101942
|
+
const phaseDir = import_node_path105.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
|
|
101857
101943
|
for (const lists of fileLists.values())
|
|
101858
101944
|
for (const { file } of lists)
|
|
101859
|
-
if (!
|
|
101945
|
+
if (!import_node_fs103.default.existsSync(file))
|
|
101860
101946
|
throw new Error(
|
|
101861
101947
|
`${targetName}: Run Script "${script}" missing file list ${file}`
|
|
101862
101948
|
);
|
|
@@ -101875,7 +101961,7 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101875
101961
|
const lists = fileLists.get(kind);
|
|
101876
101962
|
env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
|
|
101877
101963
|
lists.forEach((_item, index) => {
|
|
101878
|
-
env[`SCRIPT_${kind}_FILE_LIST_${index}`] =
|
|
101964
|
+
env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path105.default.join(
|
|
101879
101965
|
phaseDir,
|
|
101880
101966
|
`${kind}-${index}.xcfilelist`
|
|
101881
101967
|
);
|
|
@@ -101886,22 +101972,22 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101886
101972
|
);
|
|
101887
101973
|
for (const file of inputFiles) {
|
|
101888
101974
|
signature2.update(file);
|
|
101889
|
-
if (
|
|
101890
|
-
const stat2 =
|
|
101975
|
+
if (import_node_fs103.default.existsSync(file)) {
|
|
101976
|
+
const stat2 = import_node_fs103.default.statSync(file);
|
|
101891
101977
|
signature2.update(`${stat2.mtimeMs}:${stat2.ctimeMs}:${stat2.size}`);
|
|
101892
101978
|
} else signature2.update("missing");
|
|
101893
101979
|
}
|
|
101894
101980
|
const stamp = signature2.digest("hex");
|
|
101895
101981
|
const key2 = `${project2.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
|
|
101896
|
-
if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) =>
|
|
101982
|
+
if (preparedSourcePhases.get(key2) === stamp && allOutputs.every((file) => import_node_fs103.default.existsSync(file)))
|
|
101897
101983
|
continue;
|
|
101898
|
-
|
|
101984
|
+
import_node_fs103.default.mkdirSync(phaseDir, { recursive: true });
|
|
101899
101985
|
if (process.platform === "linux") {
|
|
101900
101986
|
const bin = swiftToolchainBin(
|
|
101901
101987
|
privateSwiftRelease() ?? swiftNativePin().distribution.release
|
|
101902
101988
|
);
|
|
101903
|
-
const startup =
|
|
101904
|
-
|
|
101989
|
+
const startup = import_node_path105.default.join(phaseDir, "peach-tools.sh");
|
|
101990
|
+
import_node_fs103.default.writeFileSync(
|
|
101905
101991
|
startup,
|
|
101906
101992
|
'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
|
|
101907
101993
|
);
|
|
@@ -101910,15 +101996,15 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101910
101996
|
env.PEACH_PHASE_TOOLCHAIN = bin;
|
|
101911
101997
|
env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
|
|
101912
101998
|
env.BASH_ENV = startup;
|
|
101913
|
-
env.PATH = [bin, env.PATH].filter(Boolean).join(
|
|
101999
|
+
env.PATH = [bin, env.PATH].filter(Boolean).join(import_node_path105.default.delimiter);
|
|
101914
102000
|
}
|
|
101915
|
-
|
|
101916
|
-
|
|
102001
|
+
import_node_fs103.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
|
|
102002
|
+
import_node_fs103.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
|
|
101917
102003
|
for (const output of allOutputs)
|
|
101918
|
-
|
|
102004
|
+
import_node_fs103.default.mkdirSync(import_node_path105.default.dirname(output), { recursive: true });
|
|
101919
102005
|
for (const [kind, lists] of fileLists)
|
|
101920
102006
|
lists.forEach((item, index) => {
|
|
101921
|
-
|
|
102007
|
+
import_node_fs103.default.writeFileSync(
|
|
101922
102008
|
env[`SCRIPT_${kind}_FILE_LIST_${index}`],
|
|
101923
102009
|
`${item.entries.join("\n")}
|
|
101924
102010
|
`
|
|
@@ -101926,9 +102012,9 @@ function targetMembers(ref, settings, options2, settingKeys, projectInputs) {
|
|
|
101926
102012
|
});
|
|
101927
102013
|
const rawScript = str2(phase.shellScript) ?? "";
|
|
101928
102014
|
if (rawScript.includes("generate-modules-provider")) {
|
|
101929
|
-
const preloadPath =
|
|
101930
|
-
|
|
101931
|
-
|
|
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(
|
|
101932
102018
|
preloadPath,
|
|
101933
102019
|
[
|
|
101934
102020
|
"const cp = require('node:child_process');",
|
|
@@ -101966,7 +102052,7 @@ ${output}`
|
|
|
101966
102052
|
);
|
|
101967
102053
|
}
|
|
101968
102054
|
const missing2 = allOutputs.filter(
|
|
101969
|
-
(file) => file === infoPlistOutput && !
|
|
102055
|
+
(file) => file === infoPlistOutput && !import_node_fs103.default.existsSync(file)
|
|
101970
102056
|
);
|
|
101971
102057
|
if (missing2.length > 0)
|
|
101972
102058
|
throw new Error(
|
|
@@ -101977,9 +102063,9 @@ ${output}`
|
|
|
101977
102063
|
}
|
|
101978
102064
|
project2.visitMembers(
|
|
101979
102065
|
targetId,
|
|
101980
|
-
xcodePathResolver(project2.objects, project2.projectDir,
|
|
101981
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
101982
|
-
|
|
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,
|
|
101983
102069
|
(file, kind, bundleName) => {
|
|
101984
102070
|
if (kind === "header") {
|
|
101985
102071
|
headers.add(file);
|
|
@@ -101990,9 +102076,9 @@ ${output}`
|
|
|
101990
102076
|
if (bundleName) resourceNames[file] = bundleName;
|
|
101991
102077
|
return;
|
|
101992
102078
|
}
|
|
101993
|
-
if (!
|
|
102079
|
+
if (!import_node_fs103.default.existsSync(file)) {
|
|
101994
102080
|
if (options2.requireSources === false) return;
|
|
101995
|
-
const script = scriptForOutput.get(
|
|
102081
|
+
const script = scriptForOutput.get(import_node_path105.default.normalize(file));
|
|
101996
102082
|
throw new Error(
|
|
101997
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}`
|
|
101998
102084
|
);
|
|
@@ -102003,21 +102089,21 @@ ${output}`
|
|
|
102003
102089
|
);
|
|
102004
102090
|
if (options2.prepareGeneratedSources && options2.requireSources !== false) {
|
|
102005
102091
|
const interfaceFiles = [...resources].filter(
|
|
102006
|
-
(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"))
|
|
102007
102093
|
);
|
|
102008
102094
|
let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
|
|
102009
|
-
if (process.platform !== "darwin" && !launchName && infoPlistOutput &&
|
|
102010
|
-
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"));
|
|
102011
102097
|
const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
|
|
102012
102098
|
if (typeof declared === "string") launchName = expand(declared, settings);
|
|
102013
102099
|
}
|
|
102014
102100
|
const interfaceOutputs = /* @__PURE__ */ new Set();
|
|
102015
102101
|
for (const file of interfaceFiles) {
|
|
102016
|
-
const localization = file.split(
|
|
102102
|
+
const localization = file.split(import_node_path105.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
|
|
102017
102103
|
const isStoryboard = file.endsWith(".storyboard");
|
|
102018
102104
|
const extension = isStoryboard ? ".storyboardc" : ".nib";
|
|
102019
|
-
const name3 =
|
|
102020
|
-
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(
|
|
102021
102107
|
settings("DERIVED_FILE_DIR"),
|
|
102022
102108
|
"InterfaceBuilder",
|
|
102023
102109
|
localization,
|
|
@@ -102036,10 +102122,10 @@ ${output}`
|
|
|
102036
102122
|
const inputs2 = JSON.stringify([
|
|
102037
102123
|
1,
|
|
102038
102124
|
args,
|
|
102039
|
-
(0, import_node_crypto61.createHash)("sha256").update(
|
|
102125
|
+
(0, import_node_crypto61.createHash)("sha256").update(import_node_fs103.default.readFileSync(file)).digest("hex")
|
|
102040
102126
|
]);
|
|
102041
102127
|
const developer = settings("DEVELOPER_DIR");
|
|
102042
|
-
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") : [];
|
|
102043
102129
|
projectInputs.add(file);
|
|
102044
102130
|
resources.delete(file);
|
|
102045
102131
|
if (cached5[0] !== inputs2 || process.platform === "darwin" && cached5[1] !== developer) {
|
|
@@ -102049,15 +102135,15 @@ ${output}`
|
|
|
102049
102135
|
`${targetName}: Interface Builder compilation requires macOS and Xcode`
|
|
102050
102136
|
);
|
|
102051
102137
|
}
|
|
102052
|
-
|
|
102053
|
-
|
|
102054
|
-
|
|
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 });
|
|
102055
102141
|
(0, import_node_child_process49.execFileSync)("xcrun", ["ibtool", "--compile", output, file, ...args], {
|
|
102056
102142
|
cwd: project2.projectDir,
|
|
102057
102143
|
stdio: ["ignore", "pipe", "pipe"],
|
|
102058
102144
|
timeout: runScriptTimeoutMs
|
|
102059
102145
|
});
|
|
102060
|
-
|
|
102146
|
+
import_node_fs103.default.writeFileSync(stamp, `${inputs2}
|
|
102061
102147
|
${developer}
|
|
102062
102148
|
`);
|
|
102063
102149
|
}
|
|
@@ -102099,33 +102185,33 @@ ${developer}
|
|
|
102099
102185
|
function commonAncestor(dirs) {
|
|
102100
102186
|
let common2 = dirs[0];
|
|
102101
102187
|
for (const dir of dirs) {
|
|
102102
|
-
while (common2 !==
|
|
102103
|
-
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);
|
|
102104
102190
|
}
|
|
102105
102191
|
return common2;
|
|
102106
102192
|
}
|
|
102107
102193
|
function installedPodsSandbox(pods) {
|
|
102108
|
-
const podfileLock =
|
|
102109
|
-
const manifestLock =
|
|
102110
|
-
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))
|
|
102111
102197
|
throw new Error(
|
|
102112
|
-
`${pods} has no ${podfileLock}: run \`pod install\` in ${
|
|
102198
|
+
`${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path105.default.dirname(pods)}`
|
|
102113
102199
|
);
|
|
102114
|
-
if (!
|
|
102200
|
+
if (!import_node_fs103.default.existsSync(manifestLock) || !import_node_fs103.default.readFileSync(manifestLock).equals(import_node_fs103.default.readFileSync(podfileLock)))
|
|
102115
102201
|
throw new Error(
|
|
102116
|
-
`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)}`
|
|
102117
102203
|
);
|
|
102118
102204
|
const specChecksums = {};
|
|
102119
|
-
const lines =
|
|
102205
|
+
const lines = import_node_fs103.default.readFileSync(manifestLock, "utf8").split("\n");
|
|
102120
102206
|
const start = lines.indexOf("SPEC CHECKSUMS:");
|
|
102121
102207
|
for (const line of start === -1 ? [] : lines.slice(start + 1)) {
|
|
102122
102208
|
const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
|
|
102123
102209
|
if (!entry) break;
|
|
102124
102210
|
specChecksums[entry[1]] = entry[2];
|
|
102125
102211
|
}
|
|
102126
|
-
const specs =
|
|
102127
|
-
const generated =
|
|
102128
|
-
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))
|
|
102129
102215
|
return {
|
|
102130
102216
|
podfileLock,
|
|
102131
102217
|
manifestLock,
|
|
@@ -102133,15 +102219,15 @@ function installedPodsSandbox(pods) {
|
|
|
102133
102219
|
localPodspecs: readPodGraphSpecifications(generated),
|
|
102134
102220
|
specificationFiles: [generated]
|
|
102135
102221
|
};
|
|
102136
|
-
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)) : [];
|
|
102137
102223
|
return {
|
|
102138
102224
|
podfileLock,
|
|
102139
102225
|
manifestLock,
|
|
102140
102226
|
specChecksums,
|
|
102141
102227
|
localPodspecs: new Map(
|
|
102142
102228
|
specificationFiles.map((file) => [
|
|
102143
|
-
|
|
102144
|
-
|
|
102229
|
+
import_node_path105.default.basename(file, ".podspec.json"),
|
|
102230
|
+
import_node_fs103.default.readFileSync(file, "utf8")
|
|
102145
102231
|
])
|
|
102146
102232
|
),
|
|
102147
102233
|
specificationFiles
|
|
@@ -102156,14 +102242,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
102156
102242
|
if (!xcodeProjectFile(xcodeproj)) {
|
|
102157
102243
|
if (installedPods && isPodsProject(xcodeproj))
|
|
102158
102244
|
throw new Error(
|
|
102159
|
-
`${
|
|
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))}`
|
|
102160
102246
|
);
|
|
102161
102247
|
return;
|
|
102162
102248
|
}
|
|
102163
|
-
const key2 =
|
|
102164
|
-
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"))
|
|
102165
102251
|
return;
|
|
102166
|
-
if (isPodsProject(key2)) cocoapods = installedPodsSandbox(
|
|
102252
|
+
if (isPodsProject(key2)) cocoapods = installedPodsSandbox(import_node_path105.default.dirname(key2));
|
|
102167
102253
|
const project2 = loadProject(key2);
|
|
102168
102254
|
projectAt.set(key2, project2);
|
|
102169
102255
|
projects2.push(project2);
|
|
@@ -102179,12 +102265,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
|
|
|
102179
102265
|
for (const reference of listed)
|
|
102180
102266
|
if (reference.endsWith(".xcodeproj")) addProject(reference);
|
|
102181
102267
|
if (projects2.length === 0) {
|
|
102182
|
-
throw new Error(`${
|
|
102268
|
+
throw new Error(`${import_node_path105.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
|
|
102183
102269
|
}
|
|
102184
|
-
const podfile =
|
|
102185
|
-
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))
|
|
102186
102272
|
throw new Error(
|
|
102187
|
-
`${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`
|
|
102188
102274
|
);
|
|
102189
102275
|
return { listed, projects: projects2, projectAt, cocoapods };
|
|
102190
102276
|
}
|
|
@@ -102221,7 +102307,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options2 = {}) {
|
|
|
102221
102307
|
return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options2)).map((ref) => str2(ref.target.name) ?? ref.id);
|
|
102222
102308
|
}
|
|
102223
102309
|
function defaultXcodeAppTarget(xcodeproj) {
|
|
102224
|
-
const project2 = loadProject(
|
|
102310
|
+
const project2 = loadProject(import_node_fs103.default.realpathSync.native(xcodeproj));
|
|
102225
102311
|
for (const [id, target] of Object.entries(project2.objects)) {
|
|
102226
102312
|
if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
|
|
102227
102313
|
if (isIosAppTarget({ project: project2, id, target }, { requireSources: false }))
|
|
@@ -102229,7 +102315,7 @@ function defaultXcodeAppTarget(xcodeproj) {
|
|
|
102229
102315
|
}
|
|
102230
102316
|
}
|
|
102231
102317
|
function readXcodeExtensionTargets(input) {
|
|
102232
|
-
return workspaceProjects(
|
|
102318
|
+
return workspaceProjects(import_node_fs103.default.realpathSync.native(input)).projects.flatMap(
|
|
102233
102319
|
(project2) => projectTargets(project2).flatMap((ref) => {
|
|
102234
102320
|
if (ref.target.productType !== APP_EXTENSION) return [];
|
|
102235
102321
|
const name3 = str2(ref.target.name) ?? ref.id;
|
|
@@ -102246,7 +102332,7 @@ function readXcodeExtensionTargets(input) {
|
|
|
102246
102332
|
const infoFile = get2("INFOPLIST_FILE");
|
|
102247
102333
|
if (!infoFile) throw new Error(`${name3}: extension has no INFOPLIST_FILE`);
|
|
102248
102334
|
const info = parsePlist(
|
|
102249
|
-
|
|
102335
|
+
import_node_fs103.default.readFileSync(import_node_path105.default.resolve(project2.projectDir, infoFile), "utf8")
|
|
102250
102336
|
);
|
|
102251
102337
|
if (!isRecord(info))
|
|
102252
102338
|
throw new Error(`${name3}: extension Info.plist is not a dictionary`);
|
|
@@ -102269,30 +102355,30 @@ function readXcodeExtensionTargets(input) {
|
|
|
102269
102355
|
);
|
|
102270
102356
|
}
|
|
102271
102357
|
function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
102272
|
-
const container =
|
|
102358
|
+
const container = import_node_fs103.default.realpathSync.native(xcodeprojOrWorkspace);
|
|
102273
102359
|
const { projects: projects2 } = workspaceProjects(container);
|
|
102274
102360
|
const containers = [
|
|
102275
102361
|
.../* @__PURE__ */ new Set([container, ...projects2.map((project3) => project3.xcodeproj)])
|
|
102276
102362
|
];
|
|
102277
102363
|
const found2 = containers.flatMap(
|
|
102278
102364
|
(dir) => [
|
|
102279
|
-
|
|
102280
|
-
...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)) : []
|
|
102281
102367
|
].map((data) => ({
|
|
102282
102368
|
dir,
|
|
102283
|
-
file:
|
|
102369
|
+
file: import_node_path105.default.join(data, "xcschemes", `${scheme}.xcscheme`)
|
|
102284
102370
|
}))
|
|
102285
|
-
).find((candidate) =>
|
|
102371
|
+
).find((candidate) => import_node_fs103.default.existsSync(candidate.file));
|
|
102286
102372
|
if (!found2) {
|
|
102287
102373
|
const known = containers.flatMap(
|
|
102288
|
-
(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() : []
|
|
102289
102375
|
);
|
|
102290
102376
|
throw new Error(
|
|
102291
|
-
`${
|
|
102377
|
+
`${import_node_path105.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
|
|
102292
102378
|
);
|
|
102293
102379
|
}
|
|
102294
102380
|
const launch2 = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
|
|
102295
|
-
|
|
102381
|
+
import_node_fs103.default.readFileSync(found2.file, "utf8")
|
|
102296
102382
|
);
|
|
102297
102383
|
const attribute2 = (text7, name4) => {
|
|
102298
102384
|
const value = new RegExp(`\\b${name4}\\s*=\\s*"([^"]*)"`).exec(text7)?.[1];
|
|
@@ -102305,12 +102391,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
102305
102391
|
if (!configuration2 || !blueprint || !referenced?.startsWith("container:")) {
|
|
102306
102392
|
throw new Error(`scheme ${scheme} runs no application target`);
|
|
102307
102393
|
}
|
|
102308
|
-
const projectPath =
|
|
102309
|
-
|
|
102394
|
+
const projectPath = import_node_path105.default.resolve(
|
|
102395
|
+
import_node_path105.default.dirname(found2.dir),
|
|
102310
102396
|
referenced.slice("container:".length)
|
|
102311
102397
|
);
|
|
102312
102398
|
const project2 = projects2.find(
|
|
102313
|
-
(candidate) =>
|
|
102399
|
+
(candidate) => import_node_fs103.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs103.default.realpathSync.native(projectPath)
|
|
102314
102400
|
);
|
|
102315
102401
|
const target = project2 && projectTargets(project2).find((ref) => ref.id === blueprint);
|
|
102316
102402
|
const name3 = target && str2(target.target.name);
|
|
@@ -102328,26 +102414,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
|
|
|
102328
102414
|
return { target: name3, configuration: configuration2 };
|
|
102329
102415
|
}
|
|
102330
102416
|
function selectIosAppTarget(projectRoot, iosTarget) {
|
|
102331
|
-
const nested =
|
|
102332
|
-
const iosRoot =
|
|
102333
|
-
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 });
|
|
102334
102420
|
const projects2 = (entries2.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
|
|
102335
|
-
xcodeproj:
|
|
102421
|
+
xcodeproj: import_node_path105.default.join(iosRoot, entry.name),
|
|
102336
102422
|
workspace: null
|
|
102337
102423
|
})) : entries2.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
|
|
102338
|
-
const workspace =
|
|
102424
|
+
const workspace = import_node_path105.default.join(iosRoot, entry.name);
|
|
102339
102425
|
return workspaceReferences(workspace).map((xcodeproj2) => ({
|
|
102340
102426
|
xcodeproj: xcodeproj2,
|
|
102341
102427
|
workspace
|
|
102342
102428
|
}));
|
|
102343
102429
|
}).filter(
|
|
102344
|
-
({ 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)
|
|
102345
102431
|
).filter(
|
|
102346
102432
|
({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
|
|
102347
102433
|
)).map(({ xcodeproj: xcodeproj2, workspace }) => ({
|
|
102348
102434
|
xcodeproj: xcodeproj2,
|
|
102349
102435
|
workspace,
|
|
102350
|
-
name:
|
|
102436
|
+
name: import_node_path105.default.basename(xcodeproj2)
|
|
102351
102437
|
}));
|
|
102352
102438
|
if (projects2.length === 0) return null;
|
|
102353
102439
|
if (projects2.length > 1 && !iosTarget) {
|
|
@@ -102386,13 +102472,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
102386
102472
|
if (!target) throw new Error("native app identity has no iOS application target");
|
|
102387
102473
|
if (!iosTarget) {
|
|
102388
102474
|
const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
|
|
102389
|
-
const container =
|
|
102475
|
+
const container = import_node_fs103.default.existsSync(workspace) ? workspace : xcodeproj;
|
|
102390
102476
|
const hasScheme = [container, xcodeproj].some((dir) => {
|
|
102391
|
-
if (
|
|
102477
|
+
if (import_node_fs103.default.existsSync(import_node_path105.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
|
|
102392
102478
|
return true;
|
|
102393
|
-
const users =
|
|
102394
|
-
return
|
|
102395
|
-
(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`))
|
|
102396
102482
|
);
|
|
102397
102483
|
});
|
|
102398
102484
|
if (hasScheme) target = readXcodeScheme(container, target).target;
|
|
@@ -102404,7 +102490,7 @@ function selectIosAppTarget(projectRoot, iosTarget) {
|
|
|
102404
102490
|
return { xcodeproj, target, workspace: project2.workspace };
|
|
102405
102491
|
}
|
|
102406
102492
|
async function resolveXcodeSwiftPackages(input, signal, target, configuration2) {
|
|
102407
|
-
if (
|
|
102493
|
+
if (import_node_fs103.default.existsSync(workspaceResolvedFile(import_node_fs103.default.realpathSync.native(input)))) return;
|
|
102408
102494
|
try {
|
|
102409
102495
|
readXcodeAppTarget(input, target, configuration2, {
|
|
102410
102496
|
installedPods: true,
|
|
@@ -102423,7 +102509,7 @@ async function resolveXcodeSwiftPackages(input, signal, target, configuration2)
|
|
|
102423
102509
|
function readXcodeAppTarget(input, targetName, configurationName, options2 = {}) {
|
|
102424
102510
|
if (isBazelPackage(input))
|
|
102425
102511
|
return readBazelAppTarget(input, targetName, configurationName, options2);
|
|
102426
|
-
const xcodeprojOrWorkspace =
|
|
102512
|
+
const xcodeprojOrWorkspace = import_node_fs103.default.realpathSync.native(input);
|
|
102427
102513
|
const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
|
|
102428
102514
|
const { listed, projects: projects2, projectAt, cocoapods } = workspaceProjects(
|
|
102429
102515
|
xcodeprojOrWorkspace,
|
|
@@ -102434,7 +102520,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102434
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
|
|
102435
102521
|
);
|
|
102436
102522
|
const appTargetNames = appTargets.map((ref) => str2(ref.target.name) ?? ref.id);
|
|
102437
|
-
const container =
|
|
102523
|
+
const container = import_node_path105.default.basename(xcodeprojOrWorkspace);
|
|
102438
102524
|
const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
|
|
102439
102525
|
if (named.length !== 1) {
|
|
102440
102526
|
if (options2.frameworkMachOType)
|
|
@@ -102463,15 +102549,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102463
102549
|
for (const ref of allTargets) {
|
|
102464
102550
|
const product = ref.project.object(str2(ref.target.productReference));
|
|
102465
102551
|
const file = str2(product?.path);
|
|
102466
|
-
if (file && !byProduct.has(
|
|
102467
|
-
byProduct.set(
|
|
102552
|
+
if (file && !byProduct.has(import_node_path105.default.basename(file)))
|
|
102553
|
+
byProduct.set(import_node_path105.default.basename(file), ref);
|
|
102468
102554
|
}
|
|
102469
102555
|
const proxied = (project2, proxyId) => {
|
|
102470
102556
|
const proxy = project2.object(proxyId);
|
|
102471
102557
|
if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
|
|
102472
102558
|
const portal = str2(proxy.containerPortal);
|
|
102473
102559
|
const portalPath = project2.resolvePath(portal ?? "");
|
|
102474
|
-
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;
|
|
102475
102561
|
const remote = str2(proxy.remoteGlobalIDString);
|
|
102476
102562
|
if (!owner || !remote) return void 0;
|
|
102477
102563
|
return projectTargets(owner).find(
|
|
@@ -102488,7 +102574,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102488
102574
|
const buildFile = project2.object(buildFileId);
|
|
102489
102575
|
if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
|
|
102490
102576
|
const file = project2.object(str2(buildFile.fileRef));
|
|
102491
|
-
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;
|
|
102492
102578
|
if (resolved)
|
|
102493
102579
|
found2.push({
|
|
102494
102580
|
target: resolved,
|
|
@@ -102569,7 +102655,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102569
102655
|
const otherProduct = productName(other);
|
|
102570
102656
|
for (const { file, visibility } of headerPhase(other)) {
|
|
102571
102657
|
if (visibility === "Project") continue;
|
|
102572
|
-
const key2 = `${otherProduct}/${
|
|
102658
|
+
const key2 = `${otherProduct}/${import_node_path105.default.basename(file)}`;
|
|
102573
102659
|
if (!headers.has(key2)) headers.set(key2, file);
|
|
102574
102660
|
}
|
|
102575
102661
|
}
|
|
@@ -102599,8 +102685,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102599
102685
|
ref.project.visitMembers(
|
|
102600
102686
|
ref.id,
|
|
102601
102687
|
ref.project.resolvePath,
|
|
102602
|
-
(file) => isDirectory3(file) ? walkFiles(file) :
|
|
102603
|
-
|
|
102688
|
+
(file) => isDirectory3(file) ? walkFiles(file) : import_node_fs103.default.existsSync(file) ? [file] : [],
|
|
102689
|
+
import_node_path105.default.join,
|
|
102604
102690
|
(file, kind) => {
|
|
102605
102691
|
if (kind === "header") found2.push(file);
|
|
102606
102692
|
}
|
|
@@ -102616,12 +102702,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102616
102702
|
for (const ref of projectTargets(project2)) {
|
|
102617
102703
|
const product = productName(ref);
|
|
102618
102704
|
for (const { file, visibility } of headerPhase(ref)) {
|
|
102619
|
-
const name3 =
|
|
102705
|
+
const name3 = import_node_path105.default.basename(file);
|
|
102620
102706
|
if (!entries2.has(name3))
|
|
102621
102707
|
entries2.set(name3, visibility !== "Project" ? `${product}/${name3}` : file);
|
|
102622
102708
|
}
|
|
102623
102709
|
for (const file of synchronizedHeaders(ref)) {
|
|
102624
|
-
const name3 =
|
|
102710
|
+
const name3 = import_node_path105.default.basename(file);
|
|
102625
102711
|
if (!entries2.has(name3)) entries2.set(name3, file);
|
|
102626
102712
|
}
|
|
102627
102713
|
}
|
|
@@ -102631,7 +102717,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102631
102717
|
if (folder === null) continue;
|
|
102632
102718
|
for (const file of walkFiles(folder)) {
|
|
102633
102719
|
if (!HEADER_FILE.test(file)) continue;
|
|
102634
|
-
const name3 =
|
|
102720
|
+
const name3 = import_node_path105.default.basename(file);
|
|
102635
102721
|
if (!entries2.has(name3)) entries2.set(name3, file);
|
|
102636
102722
|
}
|
|
102637
102723
|
}
|
|
@@ -102639,18 +102725,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102639
102725
|
for (const id of Object.keys(project2.objects)) {
|
|
102640
102726
|
if (project2.object(id)?.isa !== "PBXFileReference") continue;
|
|
102641
102727
|
const file = project2.resolvePath(id);
|
|
102642
|
-
if (file && HEADER_FILE.test(file) && !entries2.has(
|
|
102643
|
-
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);
|
|
102644
102730
|
}
|
|
102645
102731
|
const map2 = [...entries2];
|
|
102646
102732
|
projectHeaderMaps.set(project2, map2);
|
|
102647
102733
|
return map2;
|
|
102648
102734
|
};
|
|
102649
102735
|
const xcconfigs = /* @__PURE__ */ new Set();
|
|
102650
|
-
const buildDir = (project2) =>
|
|
102736
|
+
const buildDir = (project2) => import_node_path105.default.join(project2.projectDir, ".build/peach-xcode/Build");
|
|
102651
102737
|
const workspaceBuild = {
|
|
102652
|
-
SYMROOT:
|
|
102653
|
-
OBJROOT:
|
|
102738
|
+
SYMROOT: import_node_path105.default.join(buildDir(app.project), "Products"),
|
|
102739
|
+
OBJROOT: import_node_path105.default.join(buildDir(app.project), "Intermediates.noindex")
|
|
102654
102740
|
};
|
|
102655
102741
|
const moduleTarget = (ref) => {
|
|
102656
102742
|
const name3 = str2(ref.target.name) ?? ref.id;
|
|
@@ -102666,16 +102752,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102666
102752
|
TARGET_NAME: name3,
|
|
102667
102753
|
TARGETNAME: "$(TARGET_NAME)",
|
|
102668
102754
|
PROJECT: "$(PROJECT_NAME)",
|
|
102669
|
-
PROJECT_NAME:
|
|
102755
|
+
PROJECT_NAME: import_node_path105.default.basename(ref.project.xcodeproj, ".xcodeproj"),
|
|
102670
102756
|
PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str2(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
|
|
102671
102757
|
PROJECT_FILE_PATH: ref.project.xcodeproj,
|
|
102672
102758
|
SRCROOT: ref.project.projectDir,
|
|
102673
102759
|
SOURCE_ROOT: ref.project.projectDir,
|
|
102674
102760
|
PROJECT_DIR: ref.project.projectDir,
|
|
102675
|
-
SYMROOT:
|
|
102761
|
+
SYMROOT: import_node_path105.default.join(buildDir(ref.project), "Products"),
|
|
102676
102762
|
BUILD_DIR: "$(SYMROOT)",
|
|
102677
102763
|
BUILD_ROOT: "$(SYMROOT)",
|
|
102678
|
-
OBJROOT:
|
|
102764
|
+
OBJROOT: import_node_path105.default.join(buildDir(ref.project), "Intermediates.noindex"),
|
|
102679
102765
|
CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
|
|
102680
102766
|
BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
102681
102767
|
TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
|
|
@@ -102724,7 +102810,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102724
102810
|
xcconfigs
|
|
102725
102811
|
);
|
|
102726
102812
|
const searchRules = recursiveSearchRules(settings2);
|
|
102727
|
-
const absolute = (file) =>
|
|
102813
|
+
const absolute = (file) => import_node_path105.default.resolve(ref.project.projectDir, file);
|
|
102728
102814
|
const framework = FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "");
|
|
102729
102815
|
const product = settings2("PRODUCT_NAME");
|
|
102730
102816
|
const moduleName2 = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
|
|
@@ -102755,7 +102841,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102755
102841
|
`${name3}: Swift compatibility header phase has no Swift producer sources`
|
|
102756
102842
|
);
|
|
102757
102843
|
const building2 = options2.prepareGeneratedSources && options2.requireSources !== false;
|
|
102758
|
-
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;
|
|
102759
102845
|
if (versioning) {
|
|
102760
102846
|
const version2 = settings2("CURRENT_PROJECT_VERSION");
|
|
102761
102847
|
const custom = [
|
|
@@ -102768,7 +102854,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102768
102854
|
].filter((key2) => settings2(key2));
|
|
102769
102855
|
if (custom.length)
|
|
102770
102856
|
throw new Error(
|
|
102771
|
-
`${name3}: Xcode generates ${
|
|
102857
|
+
`${name3}: Xcode generates ${import_node_path105.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
|
|
102772
102858
|
);
|
|
102773
102859
|
const symbol2 = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
|
|
102774
102860
|
const [major, minor] = version2.split(".");
|
|
@@ -102781,9 +102867,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102781
102867
|
` const double ${symbol2}VersionNumber __attribute__ ((used)) = (double)${number4};`,
|
|
102782
102868
|
""
|
|
102783
102869
|
].join("\n");
|
|
102784
|
-
if (!
|
|
102785
|
-
|
|
102786
|
-
|
|
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);
|
|
102787
102873
|
}
|
|
102788
102874
|
allSources.push(versioning);
|
|
102789
102875
|
}
|
|
@@ -102802,7 +102888,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102802
102888
|
const headerFiles3 = headerPhase(ref);
|
|
102803
102889
|
const ownHeaders = /* @__PURE__ */ new Map();
|
|
102804
102890
|
for (const { file, visibility } of headerFiles3) {
|
|
102805
|
-
const name4 =
|
|
102891
|
+
const name4 = import_node_path105.default.basename(file);
|
|
102806
102892
|
const published4 = visibility !== "Project";
|
|
102807
102893
|
if (!ownHeaders.has(name4))
|
|
102808
102894
|
ownHeaders.set(name4, published4 ? `${product}/${name4}` : file);
|
|
@@ -102810,35 +102896,35 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102810
102896
|
ownHeaders.set(`${product}/${name4}`, file);
|
|
102811
102897
|
}
|
|
102812
102898
|
for (const file of synchronizedHeaders(ref)) {
|
|
102813
|
-
const name4 =
|
|
102899
|
+
const name4 = import_node_path105.default.basename(file);
|
|
102814
102900
|
if (ownHeaders.has(name4)) continue;
|
|
102815
102901
|
ownHeaders.set(name4, file);
|
|
102816
102902
|
const qualified3 = `${product}/${name4}`;
|
|
102817
102903
|
if (!ownHeaders.has(qualified3)) ownHeaders.set(qualified3, file);
|
|
102818
102904
|
}
|
|
102819
102905
|
const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
|
|
102820
|
-
const wrapper =
|
|
102821
|
-
const publicHeaders =
|
|
102906
|
+
const wrapper = import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
|
|
102907
|
+
const publicHeaders = import_node_path105.default.resolve(
|
|
102822
102908
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
102823
|
-
settings2("PUBLIC_HEADERS_FOLDER_PATH") ||
|
|
102909
|
+
settings2("PUBLIC_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "Headers")
|
|
102824
102910
|
);
|
|
102825
|
-
const privateHeaders =
|
|
102911
|
+
const privateHeaders = import_node_path105.default.resolve(
|
|
102826
102912
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
102827
|
-
settings2("PRIVATE_HEADERS_FOLDER_PATH") ||
|
|
102913
|
+
settings2("PRIVATE_HEADERS_FOLDER_PATH") || import_node_path105.default.join(wrapper, "PrivateHeaders")
|
|
102828
102914
|
);
|
|
102829
102915
|
const moduleMap2 = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
|
|
102830
|
-
const frameworkUmbrella = !compatibility && framework && members2.sources.length > 0 && moduleMap2 ?
|
|
102831
|
-
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) ? {
|
|
102832
102918
|
framework: true,
|
|
102833
102919
|
moduleMap: moduleMap2,
|
|
102834
102920
|
umbrella: frameworkUmbrella,
|
|
102835
|
-
outputModuleMap:
|
|
102836
|
-
outputUmbrella:
|
|
102921
|
+
outputModuleMap: import_node_path105.default.join(wrapper, "Modules", "module.modulemap"),
|
|
102922
|
+
outputUmbrella: import_node_path105.default.join(
|
|
102837
102923
|
wrapper,
|
|
102838
102924
|
"Headers",
|
|
102839
|
-
|
|
102925
|
+
import_node_path105.default.basename(frameworkUmbrella)
|
|
102840
102926
|
),
|
|
102841
|
-
outputHeader:
|
|
102927
|
+
outputHeader: import_node_path105.default.join(
|
|
102842
102928
|
wrapper,
|
|
102843
102929
|
"Headers",
|
|
102844
102930
|
settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName2}-Swift.h`
|
|
@@ -102852,10 +102938,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102852
102938
|
outputUmbrella: compatibility.outputUmbrella,
|
|
102853
102939
|
outputHeader: compatibility.outputHeader
|
|
102854
102940
|
} : frameworkCompatibility;
|
|
102855
|
-
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) => {
|
|
102856
102942
|
if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
|
|
102857
|
-
const file =
|
|
102858
|
-
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] : [];
|
|
102859
102945
|
}) : [];
|
|
102860
102946
|
const fileFlags = {};
|
|
102861
102947
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -102941,15 +103027,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102941
103027
|
// xcode searches its products' include directory before
|
|
102942
103028
|
// HEADER_SEARCH_PATHS and the target's derived sources after.
|
|
102943
103029
|
headerSearchPaths: [
|
|
102944
|
-
|
|
103030
|
+
import_node_path105.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
|
|
102945
103031
|
...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
|
|
102946
103032
|
(raw2) => expandSearchPath(absolute(raw2), searchRules)
|
|
102947
103033
|
),
|
|
102948
|
-
|
|
103034
|
+
import_node_path105.default.join(
|
|
102949
103035
|
`${settings2("DERIVED_FILE_DIR")}-normal`,
|
|
102950
103036
|
settings2("CURRENT_ARCH")
|
|
102951
103037
|
),
|
|
102952
|
-
|
|
103038
|
+
import_node_path105.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
|
|
102953
103039
|
settings2("DERIVED_FILE_DIR")
|
|
102954
103040
|
],
|
|
102955
103041
|
userHeaderSearchPaths: settingList(
|
|
@@ -102999,9 +103085,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
102999
103085
|
...headerFiles3.flatMap(
|
|
103000
103086
|
({ file, visibility }) => visibility === "Project" ? [] : [
|
|
103001
103087
|
[
|
|
103002
|
-
|
|
103088
|
+
import_node_path105.default.join(
|
|
103003
103089
|
visibility === "Public" ? publicHeaders : privateHeaders,
|
|
103004
|
-
|
|
103090
|
+
import_node_path105.default.basename(file)
|
|
103005
103091
|
),
|
|
103006
103092
|
file
|
|
103007
103093
|
]
|
|
@@ -103023,17 +103109,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103023
103109
|
);
|
|
103024
103110
|
return file && HEADER_FILE.test(file) ? [
|
|
103025
103111
|
[
|
|
103026
|
-
|
|
103112
|
+
import_node_path105.default.resolve(
|
|
103027
103113
|
settings2("BUILT_PRODUCTS_DIR"),
|
|
103028
103114
|
destination,
|
|
103029
|
-
|
|
103115
|
+
import_node_path105.default.basename(file)
|
|
103030
103116
|
),
|
|
103031
103117
|
file
|
|
103032
103118
|
]
|
|
103033
103119
|
] : [];
|
|
103034
103120
|
});
|
|
103035
103121
|
}),
|
|
103036
|
-
...moduleMap2 ? [[
|
|
103122
|
+
...moduleMap2 ? [[import_node_path105.default.join(wrapper, "Modules", "module.modulemap"), moduleMap2]] : []
|
|
103037
103123
|
]) : Object.fromEntries([
|
|
103038
103124
|
...podHeaders.map((file) => [file, file]),
|
|
103039
103125
|
...moduleMap2 ? [[moduleMap2, moduleMap2]] : []
|
|
@@ -103044,6 +103130,49 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103044
103130
|
};
|
|
103045
103131
|
};
|
|
103046
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
|
+
}
|
|
103047
103176
|
for (const { ref, module: module3, settings: settings2 } of builtTargets)
|
|
103048
103177
|
module3.targetDependencies = [
|
|
103049
103178
|
.../* @__PURE__ */ new Set([
|
|
@@ -103072,7 +103201,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103072
103201
|
const generate = settings2("GENERATE_INFOPLIST_FILE") === "YES";
|
|
103073
103202
|
if (!FRAMEWORK_PRODUCTS.has(str2(ref.target.productType) ?? "") || !plistSetting && !generate || module3.generatedInfoPlist && !options2.prepareGeneratedSources)
|
|
103074
103203
|
return { ref, framework: module3 };
|
|
103075
|
-
const file = plistSetting ?
|
|
103204
|
+
const file = plistSetting ? import_node_path105.default.resolve(ref.project.projectDir, plistSetting) : null;
|
|
103076
103205
|
if (file) xcconfigs.add(file);
|
|
103077
103206
|
const info2 = processedInfoPlist(module3.name, file, productSettings2, keys);
|
|
103078
103207
|
if (generate) {
|
|
@@ -103088,7 +103217,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103088
103217
|
});
|
|
103089
103218
|
const frameworks = frameworkTargets.map(({ framework }) => framework);
|
|
103090
103219
|
const podSourceDirs = builtTargets.slice(0, -1).flatMap(
|
|
103091
|
-
({ 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)) : []
|
|
103092
103221
|
);
|
|
103093
103222
|
const resourceProducts = [];
|
|
103094
103223
|
const bundleTargets = builtTargets.filter(
|
|
@@ -103099,7 +103228,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103099
103228
|
const phase = owner.ref.project.object(phaseId);
|
|
103100
103229
|
if (phase?.isa !== "PBXShellScriptBuildPhase" || str2(phase.name) !== "[CP] Copy Pods Resources")
|
|
103101
103230
|
continue;
|
|
103102
|
-
const absolute = (raw2) =>
|
|
103231
|
+
const absolute = (raw2) => import_node_path105.default.resolve(owner.ref.project.projectDir, expand(raw2, owner.settings));
|
|
103103
103232
|
const entries2 = (paths) => paths.flatMap((raw2) => {
|
|
103104
103233
|
const file = absolute(raw2);
|
|
103105
103234
|
xcconfigs.add(file);
|
|
@@ -103115,7 +103244,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103115
103244
|
].filter((file) => file.endsWith(".bundle"));
|
|
103116
103245
|
if (inputs2.length !== outputs.length)
|
|
103117
103246
|
throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
|
|
103118
|
-
const destinationRoot =
|
|
103247
|
+
const destinationRoot = import_node_path105.default.join(
|
|
103119
103248
|
owner.settings("TARGET_BUILD_DIR"),
|
|
103120
103249
|
owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
|
|
103121
103250
|
);
|
|
@@ -103124,24 +103253,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103124
103253
|
const file = str2(
|
|
103125
103254
|
target.ref.project.object(str2(target.ref.target.productReference))?.path
|
|
103126
103255
|
);
|
|
103127
|
-
return file &&
|
|
103256
|
+
return file && import_node_path105.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
|
|
103128
103257
|
});
|
|
103129
103258
|
if (!product && !isDirectory3(input2))
|
|
103130
103259
|
throw new Error(
|
|
103131
103260
|
`${owner.module.name}: resource bundle input has no selected producer: ${input2}`
|
|
103132
103261
|
);
|
|
103133
|
-
const destination =
|
|
103134
|
-
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))
|
|
103135
103264
|
throw new Error(
|
|
103136
103265
|
`${owner.module.name}: invalid resource bundle copy destination`
|
|
103137
103266
|
);
|
|
103138
|
-
const infoFile = product ?
|
|
103267
|
+
const infoFile = product ? import_node_path105.default.resolve(
|
|
103139
103268
|
product.ref.project.projectDir,
|
|
103140
103269
|
product.settings("INFOPLIST_FILE")
|
|
103141
103270
|
) : null;
|
|
103142
103271
|
if (infoFile) xcconfigs.add(infoFile);
|
|
103143
103272
|
const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
|
|
103144
|
-
const bundlePath = prefix + destination.split(
|
|
103273
|
+
const bundlePath = prefix + destination.split(import_node_path105.default.sep).join("/");
|
|
103145
103274
|
if (resourceProducts.some((resource) => resource.path === bundlePath))
|
|
103146
103275
|
throw new Error(
|
|
103147
103276
|
`${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
|
|
@@ -103152,20 +103281,20 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103152
103281
|
resources: product.module.resources,
|
|
103153
103282
|
infoPlist: buildPlist(
|
|
103154
103283
|
expandValue(
|
|
103155
|
-
parsePlist(
|
|
103284
|
+
parsePlist(import_node_fs103.default.readFileSync(infoFile, "utf8")),
|
|
103156
103285
|
product.productSettings
|
|
103157
103286
|
)
|
|
103158
103287
|
)
|
|
103159
103288
|
} : {
|
|
103160
|
-
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(),
|
|
103161
103290
|
sourceRoot: input2
|
|
103162
103291
|
}
|
|
103163
103292
|
});
|
|
103164
103293
|
}
|
|
103165
103294
|
}
|
|
103166
103295
|
}
|
|
103167
|
-
const infoPlistFile = settings("INFOPLIST_FILE") ?
|
|
103168
|
-
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;
|
|
103169
103298
|
const infoPlistPending = module2.generatedInfoPlist && !options2.prepareGeneratedSources;
|
|
103170
103299
|
const info = processedInfoPlist(
|
|
103171
103300
|
module2.name,
|
|
@@ -103174,7 +103303,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103174
103303
|
settingKeys
|
|
103175
103304
|
);
|
|
103176
103305
|
const bundleIdentifier = productSettings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
|
|
103177
|
-
const entitlements = entitlementsFile ? parsePlist(
|
|
103306
|
+
const entitlements = entitlementsFile ? parsePlist(import_node_fs103.default.readFileSync(entitlementsFile, "utf8")) : void 0;
|
|
103178
103307
|
const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
|
|
103179
103308
|
entitlements,
|
|
103180
103309
|
(value) => expand(value, (key2) => {
|
|
@@ -103212,7 +103341,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103212
103341
|
};
|
|
103213
103342
|
}
|
|
103214
103343
|
const localPackageDirs = [
|
|
103215
|
-
...listed.filter((reference) =>
|
|
103344
|
+
...listed.filter((reference) => import_node_fs103.default.existsSync(import_node_path105.default.join(reference, "Package.swift"))),
|
|
103216
103345
|
...projects2.flatMap(
|
|
103217
103346
|
(project2) => Object.entries(project2.objects).flatMap(([id, entry]) => {
|
|
103218
103347
|
if (!isDict(entry)) return [];
|
|
@@ -103222,19 +103351,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103222
103351
|
const packages = [];
|
|
103223
103352
|
while (pending2.length > 0) {
|
|
103224
103353
|
const dir = pending2.pop();
|
|
103225
|
-
if (
|
|
103354
|
+
if (import_node_fs103.default.existsSync(import_node_path105.default.join(dir, "Package.swift"))) {
|
|
103226
103355
|
packages.push(dir);
|
|
103227
103356
|
continue;
|
|
103228
103357
|
}
|
|
103229
103358
|
if (!isDirectory3(dir)) continue;
|
|
103230
|
-
for (const child of
|
|
103359
|
+
for (const child of import_node_fs103.default.readdirSync(dir, { withFileTypes: true }))
|
|
103231
103360
|
if (child.isDirectory() && !child.name.startsWith("."))
|
|
103232
|
-
pending2.push(
|
|
103361
|
+
pending2.push(import_node_path105.default.join(dir, child.name));
|
|
103233
103362
|
}
|
|
103234
103363
|
return packages;
|
|
103235
103364
|
}
|
|
103236
|
-
const candidate = entry.isa === "XCLocalSwiftPackageReference" ?
|
|
103237
|
-
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] : [];
|
|
103238
103367
|
})
|
|
103239
103368
|
)
|
|
103240
103369
|
];
|
|
@@ -103264,7 +103393,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103264
103393
|
if ((flag === "-framework" || flag === "-weak_framework") && name3)
|
|
103265
103394
|
sdkFrameworks.add(name3);
|
|
103266
103395
|
});
|
|
103267
|
-
const absolute = (raw2) =>
|
|
103396
|
+
const absolute = (raw2) => import_node_path105.default.resolve(ref.project.projectDir, expand(raw2, settings2));
|
|
103268
103397
|
const requested = options2.nativeModules;
|
|
103269
103398
|
const includeBinary = (name3, dir) => {
|
|
103270
103399
|
if (!requested || nativeTargets2.has(ref) || requested.includes(name3) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
|
|
@@ -103276,14 +103405,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103276
103405
|
for (const directory2 of expandSearchPath(absolute(raw2), searchRules)) {
|
|
103277
103406
|
if (frameworkSearchDirectories.has(directory2)) continue;
|
|
103278
103407
|
frameworkSearchDirectories.add(directory2);
|
|
103279
|
-
if (!
|
|
103408
|
+
if (!import_node_fs103.default.statSync(directory2, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory2))
|
|
103280
103409
|
continue;
|
|
103281
|
-
for (const entry of
|
|
103410
|
+
for (const entry of import_node_fs103.default.readdirSync(directory2, { withFileTypes: true })) {
|
|
103282
103411
|
const name3 = /^(.+)\.framework$/.exec(entry.name)?.[1];
|
|
103283
103412
|
if (!name3 || byProduct.has(entry.name) || searchedFrameworks.has(name3))
|
|
103284
103413
|
continue;
|
|
103285
|
-
const file =
|
|
103286
|
-
if (
|
|
103414
|
+
const file = import_node_path105.default.join(directory2, entry.name);
|
|
103415
|
+
if (import_node_fs103.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
|
|
103287
103416
|
searchedFrameworks.set(name3, file);
|
|
103288
103417
|
}
|
|
103289
103418
|
}
|
|
@@ -103291,9 +103420,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103291
103420
|
}
|
|
103292
103421
|
for (const raw2 of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
|
|
103293
103422
|
const dir = absolute(raw2);
|
|
103294
|
-
const modulemap =
|
|
103295
|
-
if (!
|
|
103296
|
-
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"));
|
|
103297
103426
|
if (name3 && !binaryFrameworks.has(name3)) includeBinary(name3, dir);
|
|
103298
103427
|
}
|
|
103299
103428
|
for (const phaseId of list(ref.target.buildPhases)) {
|
|
@@ -103302,7 +103431,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103302
103431
|
const inputs2 = list(phase.inputPaths).map(absolute);
|
|
103303
103432
|
for (const raw2 of list(phase.inputFileListPaths)) {
|
|
103304
103433
|
const file = absolute(raw2);
|
|
103305
|
-
if (!
|
|
103434
|
+
if (!import_node_fs103.default.existsSync(file)) continue;
|
|
103306
103435
|
xcconfigs.add(file);
|
|
103307
103436
|
inputs2.push(...fileListEntries(file, absolute));
|
|
103308
103437
|
}
|
|
@@ -103367,7 +103496,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103367
103496
|
...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
|
|
103368
103497
|
source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str2(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
|
|
103369
103498
|
kind: "local",
|
|
103370
|
-
dir:
|
|
103499
|
+
dir: import_node_path105.default.resolve(
|
|
103371
103500
|
project2.projectDir,
|
|
103372
103501
|
str2(reference.relativePath) ?? ""
|
|
103373
103502
|
)
|
|
@@ -103401,14 +103530,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103401
103530
|
continue;
|
|
103402
103531
|
}
|
|
103403
103532
|
if (tree2 === "BUILT_PRODUCTS_DIR" || tree2 === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
|
|
103404
|
-
byProduct.has(
|
|
103533
|
+
byProduct.has(import_node_path105.default.basename(rawPath)))
|
|
103405
103534
|
continue;
|
|
103406
103535
|
const resolved = fileId ? project2.resolvePath(fileId) : null;
|
|
103407
|
-
if (fileId && resolved !== null && !
|
|
103408
|
-
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);
|
|
103409
103538
|
const pods = parts2.lastIndexOf("Pods");
|
|
103410
|
-
const sandbox = parts2.slice(0, pods + 1).join(
|
|
103411
|
-
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")))
|
|
103412
103541
|
continue;
|
|
103413
103542
|
if (!ios_sdk_frameworks_default.frameworks.includes(name3))
|
|
103414
103543
|
throw new Error(
|
|
@@ -103436,7 +103565,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103436
103565
|
({ product }) => !options2.nativeModules || nativeTargets2.has(built2.ref) || options2.nativeModules.includes(product)
|
|
103437
103566
|
);
|
|
103438
103567
|
const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
|
|
103439
|
-
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();
|
|
103440
103569
|
if (packageResolved.length === 0) {
|
|
103441
103570
|
const requirements = remotePackageRequirements(projects2);
|
|
103442
103571
|
if (requirements.length > 0) {
|
|
@@ -103492,19 +103621,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103492
103621
|
} : {},
|
|
103493
103622
|
rootDir: commonAncestor(
|
|
103494
103623
|
[
|
|
103495
|
-
workspace ?
|
|
103624
|
+
workspace ? import_node_path105.default.dirname(workspace) : app.project.projectDir,
|
|
103496
103625
|
...used.map((project2) => project2.projectDir),
|
|
103497
103626
|
...localPackageDirs,
|
|
103498
103627
|
...linkedProducts.flatMap(
|
|
103499
|
-
({ source }) => source.kind === "local" &&
|
|
103628
|
+
({ source }) => source.kind === "local" && import_node_fs103.default.existsSync(source.dir) ? [source.dir] : []
|
|
103500
103629
|
),
|
|
103501
103630
|
...new Set(podSourceDirs),
|
|
103502
103631
|
// a target's own files may sit beside the project, such as an asset
|
|
103503
103632
|
// catalog one folder up, and xcode builds them from there
|
|
103504
103633
|
...new Set(
|
|
103505
|
-
[...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))
|
|
103506
103635
|
)
|
|
103507
|
-
].map((dir) =>
|
|
103636
|
+
].map((dir) => import_node_fs103.default.realpathSync.native(dir))
|
|
103508
103637
|
),
|
|
103509
103638
|
projectFiles: [
|
|
103510
103639
|
.../* @__PURE__ */ new Set([
|
|
@@ -103530,7 +103659,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103530
103659
|
resourceProducts,
|
|
103531
103660
|
linkedProducts,
|
|
103532
103661
|
localPackageDirs: [
|
|
103533
|
-
...new Set(localPackageDirs.map((dir) =>
|
|
103662
|
+
...new Set(localPackageDirs.map((dir) => import_node_fs103.default.realpathSync.native(dir)))
|
|
103534
103663
|
].sort(),
|
|
103535
103664
|
binaryFrameworks: [...binaryFrameworks].map(([name3, file]) => ({ name: name3, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
|
|
103536
103665
|
sdkFrameworks: [...sdkFrameworks].filter(
|
|
@@ -103543,15 +103672,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options2 = {})
|
|
|
103543
103672
|
cocoapods
|
|
103544
103673
|
};
|
|
103545
103674
|
}
|
|
103546
|
-
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;
|
|
103547
103676
|
var init_xcode_project = __esm({
|
|
103548
103677
|
"src/xcode-project.ts"() {
|
|
103549
103678
|
"use strict";
|
|
103550
103679
|
import_node_child_process49 = require("node:child_process");
|
|
103551
103680
|
import_node_crypto61 = require("node:crypto");
|
|
103552
|
-
|
|
103681
|
+
import_node_fs103 = __toESM(require("node:fs"), 1);
|
|
103553
103682
|
import_node_module9 = require("node:module");
|
|
103554
|
-
|
|
103683
|
+
import_node_path105 = __toESM(require("node:path"), 1);
|
|
103555
103684
|
init_bazel_project();
|
|
103556
103685
|
init_ios_sdk_frameworks();
|
|
103557
103686
|
init_is_record();
|
|
@@ -103563,7 +103692,9 @@ var init_xcode_project = __esm({
|
|
|
103563
103692
|
init_swift_distribution();
|
|
103564
103693
|
init_swift_native_pin();
|
|
103565
103694
|
init_swift_package();
|
|
103695
|
+
init_swift_source_file();
|
|
103566
103696
|
init_swift_toolchain();
|
|
103697
|
+
init_swift_xcframework();
|
|
103567
103698
|
init_xcode_intents();
|
|
103568
103699
|
init_xcode_json_project();
|
|
103569
103700
|
init_xcode_swift_features();
|
|
@@ -103616,15 +103747,15 @@ var init_xcode_project = __esm({
|
|
|
103616
103747
|
arch: "arm64",
|
|
103617
103748
|
variant: "normal"
|
|
103618
103749
|
};
|
|
103619
|
-
isDirectory3 = (dir) =>
|
|
103750
|
+
isDirectory3 = (dir) => import_node_fs103.default.existsSync(dir) && import_node_fs103.default.statSync(dir).isDirectory();
|
|
103620
103751
|
loaded3 = /* @__PURE__ */ new Map();
|
|
103621
103752
|
preparedSourcePhases = /* @__PURE__ */ new Map();
|
|
103622
|
-
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";
|
|
103623
103754
|
targetRefs = /* @__PURE__ */ new WeakMap();
|
|
103624
103755
|
NativeAppTargetSelectionError = class extends Error {
|
|
103625
103756
|
};
|
|
103626
|
-
workspaceResolvedFile = (xcodeprojOrWorkspace) =>
|
|
103627
|
-
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"),
|
|
103628
103759
|
"xcshareddata",
|
|
103629
103760
|
"swiftpm",
|
|
103630
103761
|
"Package.resolved"
|
|
@@ -103660,7 +103791,7 @@ function workspacePackageManager(root, declared, excluded) {
|
|
|
103660
103791
|
{ manager: "yarn", files: ["yarn.lock"] },
|
|
103661
103792
|
{ manager: "npm", files: ["package-lock.json"] }
|
|
103662
103793
|
].filter(
|
|
103663
|
-
({ 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)))
|
|
103664
103795
|
);
|
|
103665
103796
|
if (locks.length !== 1) return manager;
|
|
103666
103797
|
const lockedManager = locks[0].manager;
|
|
@@ -103674,9 +103805,9 @@ function pinnedNodeVersion(root, manifest) {
|
|
|
103674
103805
|
return exactVersionFile(root, ".nvmrc") ?? exactVersionFile(root, ".node-version");
|
|
103675
103806
|
}
|
|
103676
103807
|
function exactVersionFile(root, name3) {
|
|
103677
|
-
const file =
|
|
103678
|
-
if (!
|
|
103679
|
-
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/, "");
|
|
103680
103811
|
return EXACT_VERSION.test(version2) ? version2 : null;
|
|
103681
103812
|
}
|
|
103682
103813
|
async function hashExpoWorkspace(app, signal) {
|
|
@@ -103688,15 +103819,15 @@ async function hashExpoSourceWorkspace(app, signal) {
|
|
|
103688
103819
|
return { root, hash };
|
|
103689
103820
|
}
|
|
103690
103821
|
function pnpmStoreArgs(root) {
|
|
103691
|
-
const modules =
|
|
103692
|
-
if (!
|
|
103822
|
+
const modules = import_node_path106.default.join(root, "node_modules", ".modules.yaml");
|
|
103823
|
+
if (!import_node_fs104.default.existsSync(modules)) return [];
|
|
103693
103824
|
const store = /^\s*"?storeDir"?:\s*["']?([^"'\n,]+)/m.exec(
|
|
103694
|
-
|
|
103825
|
+
import_node_fs104.default.readFileSync(modules, "utf8")
|
|
103695
103826
|
);
|
|
103696
103827
|
return store ? ["--store-dir", store[1]] : [];
|
|
103697
103828
|
}
|
|
103698
103829
|
function linkedPackageDirectories(root, app) {
|
|
103699
|
-
const appRelative =
|
|
103830
|
+
const appRelative = import_node_path106.default.relative(root, app);
|
|
103700
103831
|
return localPackageDirectories(root, app).filter(
|
|
103701
103832
|
(directory2) => directory2 !== "" && directory2 !== appRelative
|
|
103702
103833
|
);
|
|
@@ -103704,11 +103835,11 @@ function linkedPackageDirectories(root, app) {
|
|
|
103704
103835
|
function localPackageDirectories(root, app) {
|
|
103705
103836
|
const directories = /* @__PURE__ */ new Set();
|
|
103706
103837
|
const visit3 = (directory2) => {
|
|
103707
|
-
const relative7 =
|
|
103838
|
+
const relative7 = import_node_path106.default.relative(root, directory2);
|
|
103708
103839
|
if (directories.has(relative7)) return;
|
|
103709
103840
|
directories.add(relative7);
|
|
103710
103841
|
const manifest = JSON.parse(
|
|
103711
|
-
|
|
103842
|
+
import_node_fs104.default.readFileSync(import_node_path106.default.join(directory2, "package.json"), "utf8")
|
|
103712
103843
|
);
|
|
103713
103844
|
for (const name3 of Object.keys({
|
|
103714
103845
|
...manifest.dependencies,
|
|
@@ -103716,12 +103847,12 @@ function localPackageDirectories(root, app) {
|
|
|
103716
103847
|
...manifest.peerDependencies,
|
|
103717
103848
|
...manifest.optionalDependencies
|
|
103718
103849
|
})) {
|
|
103719
|
-
for (let at = directory2; ; at =
|
|
103720
|
-
const link =
|
|
103721
|
-
if (
|
|
103722
|
-
const target =
|
|
103723
|
-
const within2 =
|
|
103724
|
-
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")))
|
|
103725
103856
|
visit3(target);
|
|
103726
103857
|
break;
|
|
103727
103858
|
}
|
|
@@ -103733,7 +103864,7 @@ function localPackageDirectories(root, app) {
|
|
|
103733
103864
|
return [...directories];
|
|
103734
103865
|
}
|
|
103735
103866
|
async function hashWorkspaceInputs(app, everyByte, signal, sourceOnly = false, podsEnvironment = reactNativePodsEnvironment()) {
|
|
103736
|
-
app =
|
|
103867
|
+
app = import_node_fs104.default.realpathSync(app);
|
|
103737
103868
|
const key2 = JSON.stringify([app, everyByte, sourceOnly, podsEnvironment]);
|
|
103738
103869
|
let pending2 = hashing.get(key2);
|
|
103739
103870
|
if (!pending2) {
|
|
@@ -103753,22 +103884,22 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103753
103884
|
sourceOnly,
|
|
103754
103885
|
linkedPackageDirectories(root, app)
|
|
103755
103886
|
);
|
|
103756
|
-
const appRelative =
|
|
103757
|
-
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"));
|
|
103758
103889
|
const hash = (0, import_node_crypto62.createHash)("sha256");
|
|
103759
103890
|
const native = (0, import_node_crypto62.createHash)("sha256");
|
|
103760
103891
|
const nativeDirectories = localPackageDirectories(root, app);
|
|
103761
103892
|
const versionFree = new Set(
|
|
103762
103893
|
nativeDirectories.filter((directory2) => directory2 !== appRelative && directory2 !== "").filter(
|
|
103763
|
-
(directory2) => !
|
|
103764
|
-
).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("/"))
|
|
103765
103896
|
);
|
|
103766
103897
|
const versioned = new Set(
|
|
103767
|
-
nativeDirectories.map((directory2) => directory2.split(
|
|
103898
|
+
nativeDirectories.map((directory2) => directory2.split(import_node_path106.default.sep).join("/")).filter((directory2) => !versionFree.has(directory2))
|
|
103768
103899
|
);
|
|
103769
103900
|
const nativeConfigBytes = (posix2, bytes) => {
|
|
103770
|
-
const directory2 =
|
|
103771
|
-
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)) {
|
|
103772
103903
|
const { version: _version, ...manifest2 } = JSON.parse(bytes.toString("utf8"));
|
|
103773
103904
|
return JSON.stringify(manifest2);
|
|
103774
103905
|
}
|
|
@@ -103782,21 +103913,21 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103782
103913
|
return !(workspaces && entry && !versioned.has(entry) && /^ {6}"version": "[^"]*",$/.test(line));
|
|
103783
103914
|
}).join("\n");
|
|
103784
103915
|
};
|
|
103785
|
-
const steersNative = (relative7) => !relative7.includes(
|
|
103786
|
-
(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)
|
|
103787
103918
|
);
|
|
103788
103919
|
const steps = [];
|
|
103789
103920
|
const unread = [];
|
|
103790
103921
|
const walk4 = (directory2) => {
|
|
103791
|
-
const entries2 =
|
|
103922
|
+
const entries2 = import_node_fs104.default.readdirSync(directory2, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name));
|
|
103792
103923
|
for (const entry of entries2) {
|
|
103793
|
-
const file =
|
|
103794
|
-
const relative7 =
|
|
103924
|
+
const file = import_node_path106.default.join(directory2, entry.name);
|
|
103925
|
+
const relative7 = import_node_path106.default.relative(root, file);
|
|
103795
103926
|
if (excluded(relative7, entry.isDirectory())) continue;
|
|
103796
103927
|
const firstStep = steps.length;
|
|
103797
103928
|
steps.push(() => hash.update(`${relative7}\0`));
|
|
103798
103929
|
if (entry.isSymbolicLink()) {
|
|
103799
|
-
const link = `link\0${
|
|
103930
|
+
const link = `link\0${import_node_fs104.default.readlinkSync(file)}\0`;
|
|
103800
103931
|
steps.push(() => {
|
|
103801
103932
|
hash.update(link);
|
|
103802
103933
|
if (steersNative(relative7)) native.update(`${relative7}\0${link}`);
|
|
@@ -103806,9 +103937,9 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103806
103937
|
walk4(file);
|
|
103807
103938
|
if (sourceOnly && steps.length === firstStep + 2) steps.length = firstStep;
|
|
103808
103939
|
} else if (entry.isFile()) {
|
|
103809
|
-
const posix2 = relative7.split(
|
|
103940
|
+
const posix2 = relative7.split(import_node_path106.default.sep).join("/");
|
|
103810
103941
|
if (NATIVE_CONFIG_FILE.test(posix2)) {
|
|
103811
|
-
const bytes =
|
|
103942
|
+
const bytes = import_node_fs104.default.readFileSync(file);
|
|
103812
103943
|
steps.push(() => {
|
|
103813
103944
|
if (everyByte) hash.update(`file\0${bytes.length}\0`).update(bytes);
|
|
103814
103945
|
if (steersNative(relative7))
|
|
@@ -103817,7 +103948,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103817
103948
|
continue;
|
|
103818
103949
|
}
|
|
103819
103950
|
if (everyByte) {
|
|
103820
|
-
const stat2 =
|
|
103951
|
+
const stat2 = import_node_fs104.default.statSync(file);
|
|
103821
103952
|
const known = fileDigests.get(file);
|
|
103822
103953
|
const content = known?.ino === stat2.ino && known.size === stat2.size && known.mtimeMs === stat2.mtimeMs && known.ctimeMs === stat2.ctimeMs ? known : {
|
|
103823
103954
|
ino: stat2.ino,
|
|
@@ -103838,7 +103969,7 @@ async function walkWorkspaceInputs(app, everyByte, sourceOnly, podsEnvironment)
|
|
|
103838
103969
|
for (let start = 0; start < unread.length; start += 32) {
|
|
103839
103970
|
await Promise.all(
|
|
103840
103971
|
unread.slice(start, start + 32).map(async ({ file, content }) => {
|
|
103841
|
-
const bytes = await
|
|
103972
|
+
const bytes = await import_node_fs104.default.promises.readFile(file);
|
|
103842
103973
|
content.size = bytes.length;
|
|
103843
103974
|
content.digest = (0, import_node_crypto62.createHash)("sha256").update(bytes).digest("hex");
|
|
103844
103975
|
fileDigests.set(file, content);
|
|
@@ -103885,13 +104016,13 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
103885
104016
|
const retire = (directory2, used) => withSwiftRootLock(
|
|
103886
104017
|
directory2,
|
|
103887
104018
|
async () => {
|
|
103888
|
-
const retired =
|
|
104019
|
+
const retired = import_node_path106.default.join(
|
|
103889
104020
|
parent,
|
|
103890
|
-
`${RETIRED_PREFIX2}${process.pid}-${
|
|
104021
|
+
`${RETIRED_PREFIX2}${process.pid}-${import_node_path106.default.basename(directory2)}`
|
|
103891
104022
|
);
|
|
103892
|
-
if (
|
|
104023
|
+
if (import_node_fs104.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs !== used) return;
|
|
103893
104024
|
try {
|
|
103894
|
-
|
|
104025
|
+
import_node_fs104.default.renameSync(directory2, retired);
|
|
103895
104026
|
} catch (error) {
|
|
103896
104027
|
if (error instanceof Error && "code" in error && error.code === "ENOENT") return;
|
|
103897
104028
|
throw error;
|
|
@@ -103902,15 +104033,15 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
103902
104033
|
false
|
|
103903
104034
|
);
|
|
103904
104035
|
const complete = [];
|
|
103905
|
-
for (const name3 of
|
|
103906
|
-
const directory2 =
|
|
104036
|
+
for (const name3 of import_node_fs104.default.readdirSync(parent)) {
|
|
104037
|
+
const directory2 = import_node_path106.default.join(parent, name3);
|
|
103907
104038
|
if (name3.startsWith(RETIRED_PREFIX2)) {
|
|
103908
104039
|
reapRetiredCacheDirectory(parent, name3);
|
|
103909
104040
|
continue;
|
|
103910
104041
|
}
|
|
103911
|
-
const used =
|
|
104042
|
+
const used = import_node_fs104.default.statSync(directory2, { throwIfNoEntry: false })?.mtimeMs;
|
|
103912
104043
|
if (directory2 === keep || used === void 0) continue;
|
|
103913
|
-
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")))
|
|
103914
104045
|
complete.push({ directory: directory2, used });
|
|
103915
104046
|
else if (Date.now() - used > ABANDONED_WORKSPACE_MS) await retire(directory2, used);
|
|
103916
104047
|
}
|
|
@@ -103919,38 +104050,38 @@ async function pruneExpoNativeWorkspaces(parent, keep) {
|
|
|
103919
104050
|
}
|
|
103920
104051
|
function syncChangedFiles(root, work, appRelative, excluded, installed2) {
|
|
103921
104052
|
const copyIfNewer = (file, relative7, newerOnly) => {
|
|
103922
|
-
const source =
|
|
103923
|
-
const target =
|
|
103924
|
-
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 });
|
|
103925
104056
|
if (existing && (newerOnly ? existing.mtime.getTime() >= source.mtime.getTime() : existing.size === source.size && existing.mtime.getTime() === source.mtime.getTime()))
|
|
103926
104057
|
return;
|
|
103927
|
-
|
|
104058
|
+
import_node_fs104.default.mkdirSync(import_node_path106.default.dirname(target), { recursive: true });
|
|
103928
104059
|
const staged = `${target}.${process.pid}.peach-sync`;
|
|
103929
|
-
|
|
103930
|
-
|
|
103931
|
-
|
|
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);
|
|
103932
104063
|
};
|
|
103933
104064
|
const walkInstalled = (directory2) => {
|
|
103934
|
-
for (const entry of
|
|
103935
|
-
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);
|
|
103936
104067
|
if (entry.isDirectory()) walkInstalled(file);
|
|
103937
|
-
else if (entry.isFile()) copyIfNewer(file,
|
|
104068
|
+
else if (entry.isFile()) copyIfNewer(file, import_node_path106.default.relative(root, file), true);
|
|
103938
104069
|
}
|
|
103939
104070
|
};
|
|
103940
|
-
const sourceIos =
|
|
104071
|
+
const sourceIos = import_node_fs104.default.existsSync(import_node_path106.default.join(root, appRelative, "ios", "Podfile"));
|
|
103941
104072
|
const walk4 = (directory2) => {
|
|
103942
|
-
for (const entry of
|
|
103943
|
-
const file =
|
|
103944
|
-
const relative7 =
|
|
103945
|
-
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))) {
|
|
103946
104077
|
walkInstalled(file);
|
|
103947
104078
|
continue;
|
|
103948
104079
|
}
|
|
103949
|
-
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"))
|
|
103950
104081
|
continue;
|
|
103951
104082
|
if (entry.isDirectory()) walk4(file);
|
|
103952
104083
|
else if (entry.isFile()) {
|
|
103953
|
-
if (NATIVE_CONFIG_FILE.test(relative7.split(
|
|
104084
|
+
if (NATIVE_CONFIG_FILE.test(relative7.split(import_node_path106.default.sep).join("/"))) continue;
|
|
103954
104085
|
copyIfNewer(file, relative7, false);
|
|
103955
104086
|
}
|
|
103956
104087
|
}
|
|
@@ -103961,10 +104092,10 @@ function watchRoot(root) {
|
|
|
103961
104092
|
const existing = watches.get(root);
|
|
103962
104093
|
if (existing) return existing;
|
|
103963
104094
|
const watch4 = { edits: 0 };
|
|
103964
|
-
const watcher =
|
|
103965
|
-
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) ?? [];
|
|
103966
104097
|
const { excluded } = watch4;
|
|
103967
|
-
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))))
|
|
103968
104099
|
return;
|
|
103969
104100
|
if (filename && watch4.ignoredLater?.(filename)) return;
|
|
103970
104101
|
watch4.edits += 1;
|
|
@@ -103980,8 +104111,8 @@ function watchRoot(root) {
|
|
|
103980
104111
|
}
|
|
103981
104112
|
async function prepareExpoNativeWorkspace(app, signal, target) {
|
|
103982
104113
|
const prepared = await prepare2(app, "workspace", signal);
|
|
103983
|
-
const ios =
|
|
103984
|
-
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"));
|
|
103985
104116
|
const workspace = selectXcodeWorkspace(ios, workspaces);
|
|
103986
104117
|
if (!workspace) throw new Error(`expected one Expo workspace in ${ios}`);
|
|
103987
104118
|
await resolveXcodeSwiftPackages(workspace, signal, target);
|
|
@@ -103998,13 +104129,13 @@ function prepareExpoNativeProject(app, signal, dependencies = "lockfile") {
|
|
|
103998
104129
|
);
|
|
103999
104130
|
}
|
|
104000
104131
|
function prepare2(app, stage, signal) {
|
|
104001
|
-
app =
|
|
104132
|
+
app = import_node_fs104.default.realpathSync(app);
|
|
104002
104133
|
const podsEnvironment = reactNativePodsEnvironment();
|
|
104003
104134
|
const key2 = `${app}\0${stage}\0${JSON.stringify(podsEnvironment)}`;
|
|
104004
104135
|
const last = current.get(key2);
|
|
104005
|
-
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")))) {
|
|
104006
104137
|
const now = /* @__PURE__ */ new Date();
|
|
104007
|
-
|
|
104138
|
+
import_node_fs104.default.utimesSync(last.result.work, now, now);
|
|
104008
104139
|
return Promise.resolve(last.result);
|
|
104009
104140
|
}
|
|
104010
104141
|
let shared = preparing.get(key2);
|
|
@@ -104027,25 +104158,25 @@ function prepare2(app, stage, signal) {
|
|
|
104027
104158
|
}
|
|
104028
104159
|
async function copyInstalledWorkspace(root, destination, excluded) {
|
|
104029
104160
|
const installed2 = [];
|
|
104030
|
-
await
|
|
104161
|
+
await import_node_fs104.default.promises.cp(root, destination, {
|
|
104031
104162
|
recursive: true,
|
|
104032
|
-
mode:
|
|
104163
|
+
mode: import_node_fs104.default.constants.COPYFILE_FICLONE,
|
|
104033
104164
|
preserveTimestamps: true,
|
|
104034
104165
|
verbatimSymlinks: true,
|
|
104035
104166
|
filter: (source) => {
|
|
104036
|
-
const relative7 =
|
|
104037
|
-
if (
|
|
104167
|
+
const relative7 = import_node_path106.default.relative(root, source);
|
|
104168
|
+
if (import_node_path106.default.basename(source) === "node_modules") installed2.push(relative7);
|
|
104038
104169
|
return !excluded(relative7);
|
|
104039
104170
|
}
|
|
104040
104171
|
});
|
|
104041
104172
|
const entries2 = installed2.flatMap((relative7) => {
|
|
104042
|
-
const source =
|
|
104043
|
-
if (
|
|
104044
|
-
|
|
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));
|
|
104045
104176
|
return [];
|
|
104046
104177
|
}
|
|
104047
|
-
|
|
104048
|
-
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));
|
|
104049
104180
|
});
|
|
104050
104181
|
if (process.platform === "darwin") {
|
|
104051
104182
|
await new Promise((resolve16, reject) => {
|
|
@@ -104057,8 +104188,8 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
104057
104188
|
);
|
|
104058
104189
|
child.stdin?.end(
|
|
104059
104190
|
entries2.flatMap((relative7) => [
|
|
104060
|
-
|
|
104061
|
-
|
|
104191
|
+
import_node_path106.default.join(root, relative7),
|
|
104192
|
+
import_node_path106.default.join(destination, relative7)
|
|
104062
104193
|
]).join("\0")
|
|
104063
104194
|
);
|
|
104064
104195
|
});
|
|
@@ -104071,32 +104202,32 @@ async function copyInstalledWorkspace(root, destination, excluded) {
|
|
|
104071
104202
|
"-R",
|
|
104072
104203
|
"-p",
|
|
104073
104204
|
"--reflink=auto",
|
|
104074
|
-
|
|
104075
|
-
|
|
104205
|
+
import_node_path106.default.join(root, relative7),
|
|
104206
|
+
import_node_path106.default.join(destination, relative7)
|
|
104076
104207
|
]);
|
|
104077
104208
|
return clone();
|
|
104078
104209
|
};
|
|
104079
104210
|
await Promise.all(Array.from({ length: 8 }, clone));
|
|
104080
104211
|
}
|
|
104081
104212
|
function nativeWorkspacesDir(root) {
|
|
104082
|
-
const device =
|
|
104213
|
+
const device = import_node_fs104.default.statSync(root).dev;
|
|
104083
104214
|
for (const cache of [
|
|
104084
104215
|
sharedCacheDir(cacheDir()),
|
|
104085
104216
|
cacheDir(),
|
|
104086
|
-
|
|
104217
|
+
import_node_path106.default.join(import_node_os21.default.homedir(), ".peach-cache")
|
|
104087
104218
|
]) {
|
|
104088
104219
|
let existing = cache;
|
|
104089
|
-
while (!
|
|
104090
|
-
if (
|
|
104091
|
-
return
|
|
104092
|
-
}
|
|
104093
|
-
let mount =
|
|
104094
|
-
while (
|
|
104095
|
-
mount =
|
|
104096
|
-
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())]);
|
|
104097
104228
|
if (tmpRoots.has(mount))
|
|
104098
|
-
return
|
|
104099
|
-
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");
|
|
104100
104231
|
}
|
|
104101
104232
|
function preparedExpoWorkspacesDir(app) {
|
|
104102
104233
|
return nativeWorkspacesDir(findWorkspaceRoot(app));
|
|
@@ -104110,7 +104241,7 @@ function trackedSourceEntries(root, work) {
|
|
|
104110
104241
|
if (listed.status !== 0) return [];
|
|
104111
104242
|
return listed.stdout.toString("utf8").split("\0").filter((entry) => {
|
|
104112
104243
|
const tab = entry.indexOf(" ");
|
|
104113
|
-
return tab > 0 &&
|
|
104244
|
+
return tab > 0 && import_node_fs104.default.existsSync(import_node_path106.default.join(work, entry.slice(tab + 1)));
|
|
104114
104245
|
});
|
|
104115
104246
|
}
|
|
104116
104247
|
function initializeWorkspaceGit(root, work) {
|
|
@@ -104159,42 +104290,42 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104159
104290
|
);
|
|
104160
104291
|
watch4.excluded = excluded;
|
|
104161
104292
|
watch4.ignoredLater = await untrackedIgnored(root, linkedPackageDirectories(root, app));
|
|
104162
|
-
const manifest = JSON.parse(
|
|
104163
|
-
const appManifest = JSON.parse(
|
|
104164
|
-
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(
|
|
104165
104296
|
nativeWorkspacesDir(root),
|
|
104166
104297
|
stage === "installed-project" ? `${nativeHash}-installed` : nativeHash
|
|
104167
104298
|
);
|
|
104168
104299
|
report(`hashed ${root}`);
|
|
104169
104300
|
const result = await withSwiftRootLock(work, async (lease) => {
|
|
104170
|
-
const marker =
|
|
104171
|
-
const projectMarker =
|
|
104172
|
-
const preparedApp =
|
|
104173
|
-
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);
|
|
104174
104305
|
if (projectReady) {
|
|
104175
104306
|
syncChangedFiles(
|
|
104176
104307
|
root,
|
|
104177
104308
|
work,
|
|
104178
104309
|
appRelative,
|
|
104179
104310
|
excluded,
|
|
104180
|
-
stage === "workspace" && !
|
|
104311
|
+
stage === "workspace" && !import_node_fs104.default.existsSync(marker)
|
|
104181
104312
|
);
|
|
104182
104313
|
report(`reusing prepared workspace ${work}`);
|
|
104183
104314
|
}
|
|
104184
104315
|
if (!projectReady) {
|
|
104185
104316
|
const partial = `${work}.${process.pid}.partial`;
|
|
104186
|
-
await
|
|
104187
|
-
await
|
|
104188
|
-
|
|
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 });
|
|
104189
104320
|
report("copying workspace");
|
|
104190
104321
|
await copyInstalledWorkspace(root, partial, excluded);
|
|
104191
|
-
|
|
104322
|
+
import_node_fs104.default.renameSync(partial, work);
|
|
104192
104323
|
initializeWorkspaceGit(root, work);
|
|
104193
104324
|
report("copied workspace");
|
|
104194
104325
|
}
|
|
104195
|
-
if (projectReady && (stage !== "workspace" ||
|
|
104326
|
+
if (projectReady && (stage !== "workspace" || import_node_fs104.default.existsSync(marker))) {
|
|
104196
104327
|
const now2 = /* @__PURE__ */ new Date();
|
|
104197
|
-
|
|
104328
|
+
import_node_fs104.default.utimesSync(work, now2, now2);
|
|
104198
104329
|
return { app: preparedApp, work };
|
|
104199
104330
|
}
|
|
104200
104331
|
const trustedConfigs = /* @__PURE__ */ new Set();
|
|
@@ -104206,10 +104337,10 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104206
104337
|
if (result2.status !== 0) continue;
|
|
104207
104338
|
const configs = JSON.parse(result2.stdout);
|
|
104208
104339
|
for (const config of configs) {
|
|
104209
|
-
const relative7 =
|
|
104210
|
-
if (relative7.startsWith("..") ||
|
|
104211
|
-
const copy =
|
|
104212
|
-
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)))
|
|
104213
104344
|
trustedConfigs.add(copy);
|
|
104214
104345
|
}
|
|
104215
104346
|
}
|
|
@@ -104217,7 +104348,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104217
104348
|
MISE_TRUSTED_CONFIG_PATHS: [
|
|
104218
104349
|
process.env.MISE_TRUSTED_CONFIG_PATHS,
|
|
104219
104350
|
...trustedConfigs
|
|
104220
|
-
].filter(Boolean).join(
|
|
104351
|
+
].filter(Boolean).join(import_node_path106.default.delimiter)
|
|
104221
104352
|
};
|
|
104222
104353
|
const run18 = (command, args, cwd, env = {}, admit = true) => {
|
|
104223
104354
|
const admitted = admit && teamMachineInstalled();
|
|
@@ -104235,8 +104366,8 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104235
104366
|
const nodeVersion = pinnedNodeVersion(root, manifest);
|
|
104236
104367
|
const pinnedBun = manager.startsWith("bun@");
|
|
104237
104368
|
const prefix = nodeVersion ? ["mise", "exec", `node@${nodeVersion}`, ...pinnedBun ? [manager] : [], "--"] : [];
|
|
104238
|
-
const bunPrefix =
|
|
104239
|
-
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");
|
|
104240
104371
|
const install = manager === "pnpm" || manager.startsWith("pnpm@") ? [
|
|
104241
104372
|
"npx",
|
|
104242
104373
|
"--yes",
|
|
@@ -104251,7 +104382,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104251
104382
|
);
|
|
104252
104383
|
const installEnv = {
|
|
104253
104384
|
npm_config_ignore_scripts: "false",
|
|
104254
|
-
...pinnedBun && !nodeVersion ? { PATH: [
|
|
104385
|
+
...pinnedBun && !nodeVersion ? { PATH: [import_node_path106.default.dirname(bunExecutable), process.env.PATH].join(import_node_path106.default.delimiter) } : {}
|
|
104255
104386
|
};
|
|
104256
104387
|
const execute = async (args, cwd, env = {}) => {
|
|
104257
104388
|
const command = [...prefix, ...args];
|
|
@@ -104277,7 +104408,7 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104277
104408
|
);
|
|
104278
104409
|
}
|
|
104279
104410
|
}
|
|
104280
|
-
if (install[0] === "npm" &&
|
|
104411
|
+
if (install[0] === "npm" && import_node_fs104.default.existsSync(import_node_path106.default.join(work, "package-lock.json"))) {
|
|
104281
104412
|
report("checking npm lockfile");
|
|
104282
104413
|
const check2 = [
|
|
104283
104414
|
...prefix,
|
|
@@ -104305,9 +104436,9 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104305
104436
|
report,
|
|
104306
104437
|
oneSdkPrepared
|
|
104307
104438
|
);
|
|
104308
|
-
|
|
104439
|
+
import_node_fs104.default.writeFileSync(projectMarker, "complete\n");
|
|
104309
104440
|
}
|
|
104310
|
-
if (stage === "workspace" && !
|
|
104441
|
+
if (stage === "workspace" && !import_node_fs104.default.existsSync(marker)) {
|
|
104311
104442
|
await prepareNativeProject(
|
|
104312
104443
|
preparedApp,
|
|
104313
104444
|
work,
|
|
@@ -104317,14 +104448,14 @@ async function prepareWorkspace(app, stage, key2, podsEnvironment) {
|
|
|
104317
104448
|
report,
|
|
104318
104449
|
oneSdkPrepared
|
|
104319
104450
|
);
|
|
104320
|
-
|
|
104451
|
+
import_node_fs104.default.writeFileSync(marker, "complete\n");
|
|
104321
104452
|
}
|
|
104322
104453
|
const now = /* @__PURE__ */ new Date();
|
|
104323
|
-
|
|
104454
|
+
import_node_fs104.default.utimesSync(work, now, now);
|
|
104324
104455
|
return { app: preparedApp, work };
|
|
104325
104456
|
});
|
|
104326
104457
|
if (stage === "workspace") readInstalledPodspecs(app, result.app);
|
|
104327
|
-
await pruneExpoNativeWorkspaces(
|
|
104458
|
+
await pruneExpoNativeWorkspaces(import_node_path106.default.dirname(work), work);
|
|
104328
104459
|
current.set(key2, { watch: watch4, edits, result });
|
|
104329
104460
|
return result;
|
|
104330
104461
|
}
|
|
@@ -104332,20 +104463,20 @@ function declaresNativeDependency(manifest, name3) {
|
|
|
104332
104463
|
return Object.hasOwn(manifest.dependencies ?? {}, name3) || Object.hasOwn(manifest.devDependencies ?? {}, name3);
|
|
104333
104464
|
}
|
|
104334
104465
|
async function prepareNativeProject(app, workspace, manifest, stage, execute, report, oneSdkPrepared) {
|
|
104335
|
-
const appRequire = (0, import_node_module10.createRequire)(
|
|
104466
|
+
const appRequire = (0, import_node_module10.createRequire)(import_node_path106.default.join(app, "package.json"));
|
|
104336
104467
|
const sourcePodEnv = {
|
|
104337
104468
|
EXPO_USE_PRECOMPILED_MODULES: "0",
|
|
104338
104469
|
ONE_PREBUILT_IOS: "0",
|
|
104339
104470
|
RCT_NEW_ARCH_ENABLED: process.env.RCT_NEW_ARCH_ENABLED ?? "1"
|
|
104340
104471
|
};
|
|
104341
104472
|
const declares2 = (name3) => declaresNativeDependency(manifest, name3);
|
|
104342
|
-
if (!
|
|
104473
|
+
if (!import_node_fs104.default.existsSync(import_node_path106.default.join(app, "ios", "Podfile"))) {
|
|
104343
104474
|
if (!declares2("expo") && !declares2("one"))
|
|
104344
104475
|
throw new Error(
|
|
104345
104476
|
`${app} has no ios/Podfile and declares neither expo nor one, so peach cannot generate an iOS project for it`
|
|
104346
104477
|
);
|
|
104347
104478
|
const prebuild = declares2("expo") ? [appRequire.resolve("expo/bin/cli"), "prebuild"] : [
|
|
104348
|
-
|
|
104479
|
+
import_node_path106.default.join(import_node_path106.default.dirname(appRequire.resolve("one/package.json")), "run.mjs"),
|
|
104349
104480
|
"prebuild"
|
|
104350
104481
|
];
|
|
104351
104482
|
await execute(
|
|
@@ -104381,25 +104512,25 @@ async function prepareNativeProject(app, workspace, manifest, stage, execute, re
|
|
|
104381
104512
|
function stageCachedQuickCryptoOpenSsl(app) {
|
|
104382
104513
|
const root = findWorkspaceRoot(app);
|
|
104383
104514
|
let packageDir = null;
|
|
104384
|
-
for (let at = app; ; at =
|
|
104385
|
-
const candidate =
|
|
104386
|
-
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"))) {
|
|
104387
104518
|
packageDir = candidate;
|
|
104388
104519
|
break;
|
|
104389
104520
|
}
|
|
104390
|
-
if (at === root ||
|
|
104521
|
+
if (at === root || import_node_path106.default.dirname(at) === at) break;
|
|
104391
104522
|
}
|
|
104392
104523
|
if (!packageDir) return;
|
|
104393
|
-
const opensslDir =
|
|
104394
|
-
if (
|
|
104395
|
-
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");
|
|
104396
104527
|
const sha2565 = /openssl_sha256\s*=\s*"([0-9a-f]{64})"/.exec(podspec)?.[1];
|
|
104397
104528
|
if (!sha2565) return;
|
|
104398
|
-
const archive =
|
|
104399
|
-
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)
|
|
104400
104531
|
return;
|
|
104401
|
-
|
|
104402
|
-
|
|
104532
|
+
import_node_fs104.default.rmSync(opensslDir, { recursive: true, force: true });
|
|
104533
|
+
import_node_fs104.default.mkdirSync(opensslDir, { recursive: true });
|
|
104403
104534
|
(0, import_node_child_process50.execFileSync)("unzip", ["-q", "-o", archive, "-d", opensslDir]);
|
|
104404
104535
|
}
|
|
104405
104536
|
async function runAdmitted(lease, command, args, cwd, extraEnv, admitted) {
|
|
@@ -104434,16 +104565,16 @@ ${failedOutputLine(command, cwd, bytes)}`
|
|
|
104434
104565
|
});
|
|
104435
104566
|
});
|
|
104436
104567
|
}
|
|
104437
|
-
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;
|
|
104438
104569
|
var init_expo_native_workspace = __esm({
|
|
104439
104570
|
"src/expo-native-workspace.ts"() {
|
|
104440
104571
|
"use strict";
|
|
104441
104572
|
import_node_child_process50 = require("node:child_process");
|
|
104442
104573
|
import_node_crypto62 = require("node:crypto");
|
|
104443
|
-
|
|
104574
|
+
import_node_fs104 = __toESM(require("node:fs"), 1);
|
|
104444
104575
|
import_node_module10 = require("node:module");
|
|
104445
104576
|
import_node_os21 = __toESM(require("node:os"), 1);
|
|
104446
|
-
|
|
104577
|
+
import_node_path106 = __toESM(require("node:path"), 1);
|
|
104447
104578
|
import_node_util13 = require("node:util");
|
|
104448
104579
|
init_detect();
|
|
104449
104580
|
init_admitted_mac_build();
|
|
@@ -104531,7 +104662,7 @@ async function expoDiscoveryKey(options2) {
|
|
|
104531
104662
|
return { key: key2, root };
|
|
104532
104663
|
}
|
|
104533
104664
|
function expoDiscoveryCacheDir() {
|
|
104534
|
-
return
|
|
104665
|
+
return import_node_path107.default.join(sharedCacheDir(import_node_path107.default.join(ambientHomeDir(), "cache")), "expo-discovery");
|
|
104535
104666
|
}
|
|
104536
104667
|
function vanished2(error) {
|
|
104537
104668
|
return error instanceof Error && "code" in error && error.code === "ENOENT";
|
|
@@ -104539,25 +104670,25 @@ function vanished2(error) {
|
|
|
104539
104670
|
function renew(file) {
|
|
104540
104671
|
const now = /* @__PURE__ */ new Date();
|
|
104541
104672
|
try {
|
|
104542
|
-
|
|
104673
|
+
import_node_fs105.default.utimesSync(file, now, now);
|
|
104543
104674
|
} catch (error) {
|
|
104544
104675
|
if (!vanished2(error)) throw error;
|
|
104545
104676
|
}
|
|
104546
104677
|
}
|
|
104547
104678
|
function expireDiscovery(dir, keep) {
|
|
104548
104679
|
const sweep = (parent, expiry) => {
|
|
104549
|
-
if (!
|
|
104550
|
-
for (const name3 of
|
|
104680
|
+
if (!import_node_fs105.default.existsSync(parent)) return;
|
|
104681
|
+
for (const name3 of import_node_fs105.default.readdirSync(parent)) {
|
|
104551
104682
|
if (!expiry(name3)) continue;
|
|
104552
|
-
const file =
|
|
104553
|
-
const modified =
|
|
104683
|
+
const file = import_node_path107.default.join(parent, name3);
|
|
104684
|
+
const modified = import_node_fs105.default.statSync(file, { throwIfNoEntry: false })?.mtimeMs;
|
|
104554
104685
|
if (modified === void 0 || file === keep) continue;
|
|
104555
104686
|
const limit = name3.endsWith(".tmp") ? ORPHAN_TEMPORARY_MS : EXPIRY_MS;
|
|
104556
|
-
if (Date.now() - modified > limit)
|
|
104687
|
+
if (Date.now() - modified > limit) import_node_fs105.default.rmSync(file, { force: true });
|
|
104557
104688
|
}
|
|
104558
104689
|
};
|
|
104559
104690
|
sweep(dir, (name3) => name3.endsWith(".json") || name3.endsWith(".tmp"));
|
|
104560
|
-
sweep(
|
|
104691
|
+
sweep(import_node_path107.default.join(dir, "blobs"), () => true);
|
|
104561
104692
|
}
|
|
104562
104693
|
function isExpoSwiftSourceUnit(value) {
|
|
104563
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");
|
|
@@ -104567,9 +104698,9 @@ function isStoredUnit(value) {
|
|
|
104567
104698
|
}
|
|
104568
104699
|
function readExpoDiscovery(key2) {
|
|
104569
104700
|
let parsed2;
|
|
104570
|
-
const record6 =
|
|
104701
|
+
const record6 = import_node_path107.default.join(expoDiscoveryCacheDir(), `${key2}.json`);
|
|
104571
104702
|
try {
|
|
104572
|
-
parsed2 = JSON.parse(
|
|
104703
|
+
parsed2 = JSON.parse(import_node_fs105.default.readFileSync(record6, "utf8"));
|
|
104573
104704
|
} catch {
|
|
104574
104705
|
return void 0;
|
|
104575
104706
|
}
|
|
@@ -104596,8 +104727,8 @@ function readExpoDiscovery(key2) {
|
|
|
104596
104727
|
if (!Array.isArray(parsed2.units) || !parsed2.units.every(isBodyOffset))
|
|
104597
104728
|
return void 0;
|
|
104598
104729
|
if (typeof parsed2.archive !== "string" || !isDigest(parsed2.archive)) return void 0;
|
|
104599
|
-
const archive =
|
|
104600
|
-
const bytes =
|
|
104730
|
+
const archive = import_node_path107.default.join(expoDiscoveryCacheDir(), "blobs", `${parsed2.archive}.zst`);
|
|
104731
|
+
const bytes = import_node_fs105.default.readFileSync(archive);
|
|
104601
104732
|
if ((0, import_node_crypto63.createHash)("sha256").update(bytes).digest("hex") !== parsed2.archive)
|
|
104602
104733
|
return void 0;
|
|
104603
104734
|
const bodies = (0, import_node_zlib7.zstdDecompressSync)(bytes);
|
|
@@ -104652,13 +104783,13 @@ function readExpoDiscovery(key2) {
|
|
|
104652
104783
|
}
|
|
104653
104784
|
}
|
|
104654
104785
|
function fileHashesPath() {
|
|
104655
|
-
return
|
|
104786
|
+
return import_node_path107.default.join(expoDiscoveryCacheDir(), "framework-file-hashes.json");
|
|
104656
104787
|
}
|
|
104657
104788
|
function stampedFileHash(file) {
|
|
104658
104789
|
if (!fileHashesLoaded) {
|
|
104659
104790
|
fileHashesLoaded = true;
|
|
104660
104791
|
try {
|
|
104661
|
-
const saved = JSON.parse(
|
|
104792
|
+
const saved = JSON.parse(import_node_fs105.default.readFileSync(fileHashesPath(), "utf8"));
|
|
104662
104793
|
if (isRecord(saved)) {
|
|
104663
104794
|
for (const [entry, value] of Object.entries(saved))
|
|
104664
104795
|
if (Array.isArray(value) && typeof value[0] === "string" && typeof value[1] === "string")
|
|
@@ -104668,11 +104799,11 @@ function stampedFileHash(file) {
|
|
|
104668
104799
|
fileHashes.clear();
|
|
104669
104800
|
}
|
|
104670
104801
|
}
|
|
104671
|
-
const stat2 =
|
|
104802
|
+
const stat2 = import_node_fs105.default.statSync(file, { bigint: true });
|
|
104672
104803
|
const stamp = [stat2.dev, stat2.ino, stat2.size, stat2.mtimeNs, stat2.ctimeNs].join(":");
|
|
104673
104804
|
const cached5 = fileHashes.get(file);
|
|
104674
104805
|
if (cached5?.stamp === stamp) return cached5.checksum;
|
|
104675
|
-
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");
|
|
104676
104807
|
fileHashes.set(file, { stamp, checksum });
|
|
104677
104808
|
fileHashesChanged = true;
|
|
104678
104809
|
return checksum;
|
|
@@ -104683,18 +104814,18 @@ function saveFileHashes() {
|
|
|
104683
104814
|
const target = fileHashesPath();
|
|
104684
104815
|
const temporary = `${target}.${process.pid}.${(0, import_node_crypto63.randomUUID)()}.tmp`;
|
|
104685
104816
|
try {
|
|
104686
|
-
|
|
104687
|
-
|
|
104817
|
+
import_node_fs105.default.mkdirSync(import_node_path107.default.dirname(target), { recursive: true });
|
|
104818
|
+
import_node_fs105.default.writeFileSync(
|
|
104688
104819
|
temporary,
|
|
104689
104820
|
JSON.stringify(
|
|
104690
104821
|
Object.fromEntries(
|
|
104691
|
-
[...fileHashes].filter(([entry]) =>
|
|
104822
|
+
[...fileHashes].filter(([entry]) => import_node_fs105.default.existsSync(entry)).map(([entry, { stamp, checksum }]) => [entry, [stamp, checksum]])
|
|
104692
104823
|
)
|
|
104693
104824
|
)
|
|
104694
104825
|
);
|
|
104695
|
-
|
|
104826
|
+
import_node_fs105.default.renameSync(temporary, target);
|
|
104696
104827
|
} catch {
|
|
104697
|
-
|
|
104828
|
+
import_node_fs105.default.rmSync(temporary, { force: true });
|
|
104698
104829
|
}
|
|
104699
104830
|
}
|
|
104700
104831
|
function treeDigest(directory2, signal) {
|
|
@@ -104702,14 +104833,14 @@ function treeDigest(directory2, signal) {
|
|
|
104702
104833
|
const seen = /* @__PURE__ */ new Set();
|
|
104703
104834
|
const walk4 = (dir) => {
|
|
104704
104835
|
signal?.throwIfAborted();
|
|
104705
|
-
const canonical =
|
|
104836
|
+
const canonical = import_node_fs105.default.realpathSync(dir);
|
|
104706
104837
|
if (seen.has(canonical)) return;
|
|
104707
104838
|
seen.add(canonical);
|
|
104708
|
-
for (const child of
|
|
104709
|
-
const file =
|
|
104710
|
-
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);
|
|
104711
104842
|
if (child.isSymbolicLink()) {
|
|
104712
|
-
entries2.set(relative7, `link\0${
|
|
104843
|
+
entries2.set(relative7, `link\0${import_node_fs105.default.readlinkSync(file)}`);
|
|
104713
104844
|
} else if (child.isDirectory()) {
|
|
104714
104845
|
walk4(file);
|
|
104715
104846
|
} else if (child.isFile()) {
|
|
@@ -104723,7 +104854,7 @@ function treeDigest(directory2, signal) {
|
|
|
104723
104854
|
function frameworkDigest(directory2, signal) {
|
|
104724
104855
|
let root;
|
|
104725
104856
|
try {
|
|
104726
|
-
root =
|
|
104857
|
+
root = import_node_fs105.default.realpathSync(directory2);
|
|
104727
104858
|
} catch (error) {
|
|
104728
104859
|
if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ENOTDIR"))
|
|
104729
104860
|
return MISSING_TREE;
|
|
@@ -104732,8 +104863,8 @@ function frameworkDigest(directory2, signal) {
|
|
|
104732
104863
|
const entries2 = treeDigest(directory2, signal);
|
|
104733
104864
|
for (const [relative7, value] of entries2) {
|
|
104734
104865
|
if (!value.startsWith("link\0")) continue;
|
|
104735
|
-
const target =
|
|
104736
|
-
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}`))
|
|
104737
104868
|
throw new Error(`framework link escapes its tree: ${relative7}`);
|
|
104738
104869
|
}
|
|
104739
104870
|
return (0, import_node_crypto63.createHash)("sha256").update(JSON.stringify([...entries2])).digest("hex");
|
|
@@ -104751,8 +104882,8 @@ function rewritePreparedPaths(options2) {
|
|
|
104751
104882
|
let preparedBytes;
|
|
104752
104883
|
let sourceBytes;
|
|
104753
104884
|
try {
|
|
104754
|
-
preparedBytes =
|
|
104755
|
-
sourceBytes =
|
|
104885
|
+
preparedBytes = import_node_fs105.default.readFileSync(preparedFile);
|
|
104886
|
+
sourceBytes = import_node_fs105.default.readFileSync(sourceFile);
|
|
104756
104887
|
} catch {
|
|
104757
104888
|
return null;
|
|
104758
104889
|
}
|
|
@@ -104782,7 +104913,7 @@ function rewritePreparedPaths(options2) {
|
|
|
104782
104913
|
return match;
|
|
104783
104914
|
const separator = value.lastIndexOf("#");
|
|
104784
104915
|
const preparedFile = value.slice(0, separator);
|
|
104785
|
-
if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${
|
|
104916
|
+
if (separator < 0 || !preparedFile.startsWith(`${preparedRoot}${import_node_path107.default.sep}`)) {
|
|
104786
104917
|
refusedPlugin = true;
|
|
104787
104918
|
return match;
|
|
104788
104919
|
}
|
|
@@ -104830,22 +104961,22 @@ function rewritePreparedPaths(options2) {
|
|
|
104830
104961
|
frameworkDependencies[sourceDir] = sourceDigest;
|
|
104831
104962
|
let portableDir = sourceDir;
|
|
104832
104963
|
if (preparedDigest !== sourceDigest) {
|
|
104833
|
-
const parent =
|
|
104834
|
-
portableDir =
|
|
104835
|
-
if (!
|
|
104836
|
-
|
|
104837
|
-
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`);
|
|
104838
104969
|
try {
|
|
104839
|
-
|
|
104970
|
+
import_node_fs105.default.cpSync(dir, tmp, { recursive: true, verbatimSymlinks: true });
|
|
104840
104971
|
if (frameworkDigest(tmp, signal) !== preparedDigest)
|
|
104841
104972
|
return { refuse: `framework changed while copying: ${dir}` };
|
|
104842
104973
|
try {
|
|
104843
|
-
|
|
104974
|
+
import_node_fs105.default.renameSync(tmp, portableDir);
|
|
104844
104975
|
} catch (error) {
|
|
104845
|
-
if (!
|
|
104976
|
+
if (!import_node_fs105.default.existsSync(portableDir)) throw error;
|
|
104846
104977
|
}
|
|
104847
104978
|
} finally {
|
|
104848
|
-
|
|
104979
|
+
import_node_fs105.default.rmSync(tmp, { recursive: true, force: true });
|
|
104849
104980
|
}
|
|
104850
104981
|
}
|
|
104851
104982
|
if (frameworkDigest(portableDir, signal) !== preparedDigest)
|
|
@@ -104862,10 +104993,10 @@ function rewritePreparedPaths(options2) {
|
|
|
104862
104993
|
function writeExpoDiscovery(options2) {
|
|
104863
104994
|
try {
|
|
104864
104995
|
const dir = expoDiscoveryCacheDir();
|
|
104865
|
-
|
|
104866
|
-
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`);
|
|
104867
104998
|
if (options2.units === null) {
|
|
104868
|
-
|
|
104999
|
+
import_node_fs105.default.writeFileSync(
|
|
104869
105000
|
tmp,
|
|
104870
105001
|
JSON.stringify({
|
|
104871
105002
|
format: FORMAT,
|
|
@@ -104875,11 +105006,11 @@ function writeExpoDiscovery(options2) {
|
|
|
104875
105006
|
frameworks: {}
|
|
104876
105007
|
})
|
|
104877
105008
|
);
|
|
104878
|
-
|
|
104879
|
-
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`));
|
|
104880
105011
|
return null;
|
|
104881
105012
|
}
|
|
104882
|
-
const preparedRoot =
|
|
105013
|
+
const preparedRoot = import_node_fs105.default.realpathSync(options2.preparedRoot);
|
|
104883
105014
|
const rewritten = rewritePreparedPaths({
|
|
104884
105015
|
units: options2.units,
|
|
104885
105016
|
sourceRoot: options2.sourceRoot,
|
|
@@ -104887,8 +105018,8 @@ function writeExpoDiscovery(options2) {
|
|
|
104887
105018
|
signal: options2.signal
|
|
104888
105019
|
});
|
|
104889
105020
|
if ("refuse" in rewritten) return rewritten.refuse;
|
|
104890
|
-
const blobDir =
|
|
104891
|
-
|
|
105021
|
+
const blobDir = import_node_path107.default.join(dir, "blobs");
|
|
105022
|
+
import_node_fs105.default.mkdirSync(blobDir, { recursive: true });
|
|
104892
105023
|
const seen = /* @__PURE__ */ new Map();
|
|
104893
105024
|
const chunks = [];
|
|
104894
105025
|
let size2 = 0;
|
|
@@ -104927,14 +105058,14 @@ function writeExpoDiscovery(options2) {
|
|
|
104927
105058
|
);
|
|
104928
105059
|
const contents2 = (0, import_node_zlib7.zstdCompressSync)(Buffer.concat(chunks, size2));
|
|
104929
105060
|
const archive = (0, import_node_crypto63.createHash)("sha256").update(contents2).digest("hex");
|
|
104930
|
-
const temporary =
|
|
105061
|
+
const temporary = import_node_path107.default.join(blobDir, "." + (0, import_node_crypto63.randomUUID)() + ".tmp");
|
|
104931
105062
|
try {
|
|
104932
|
-
|
|
104933
|
-
|
|
105063
|
+
import_node_fs105.default.writeFileSync(temporary, contents2);
|
|
105064
|
+
import_node_fs105.default.renameSync(temporary, import_node_path107.default.join(blobDir, `${archive}.zst`));
|
|
104934
105065
|
} finally {
|
|
104935
|
-
|
|
105066
|
+
import_node_fs105.default.rmSync(temporary, { force: true });
|
|
104936
105067
|
}
|
|
104937
|
-
|
|
105068
|
+
import_node_fs105.default.writeFileSync(
|
|
104938
105069
|
tmp,
|
|
104939
105070
|
JSON.stringify({
|
|
104940
105071
|
format: FORMAT,
|
|
@@ -104945,8 +105076,8 @@ function writeExpoDiscovery(options2) {
|
|
|
104945
105076
|
frameworks: rewritten.frameworks
|
|
104946
105077
|
})
|
|
104947
105078
|
);
|
|
104948
|
-
|
|
104949
|
-
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`));
|
|
104950
105081
|
saveFileHashes();
|
|
104951
105082
|
return rewritten.units;
|
|
104952
105083
|
} catch (error) {
|
|
@@ -104954,13 +105085,13 @@ function writeExpoDiscovery(options2) {
|
|
|
104954
105085
|
return error instanceof Error ? error.message : String(error);
|
|
104955
105086
|
}
|
|
104956
105087
|
}
|
|
104957
|
-
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;
|
|
104958
105089
|
var init_expo_discovery_cache = __esm({
|
|
104959
105090
|
"src/expo-discovery-cache.ts"() {
|
|
104960
105091
|
"use strict";
|
|
104961
105092
|
import_node_crypto63 = require("node:crypto");
|
|
104962
|
-
|
|
104963
|
-
|
|
105093
|
+
import_node_fs105 = __toESM(require("node:fs"), 1);
|
|
105094
|
+
import_node_path107 = __toESM(require("node:path"), 1);
|
|
104964
105095
|
import_node_zlib7 = require("node:zlib");
|
|
104965
105096
|
init_expo_eager_seam_contract();
|
|
104966
105097
|
init_answeredNativePackages();
|
|
@@ -105114,7 +105245,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
105114
105245
|
const rtcAppGroupIdentifier = nonEmptyString2(dictionary3.RTCAppGroupIdentifier);
|
|
105115
105246
|
const screenShareExtensionBundleId = typeof dictionary3.ScreenShareExtensionBundleId === "string" ? dictionary3.ScreenShareExtensionBundleId : void 0;
|
|
105116
105247
|
const rootModuleName = readRootModuleName(
|
|
105117
|
-
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"))
|
|
105118
105249
|
);
|
|
105119
105250
|
const identity2 = {
|
|
105120
105251
|
...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
|
|
@@ -105138,7 +105269,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
105138
105269
|
googleSignIn: readGoogleSignInConfiguration(
|
|
105139
105270
|
dictionary3,
|
|
105140
105271
|
Object.fromEntries(
|
|
105141
|
-
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)])
|
|
105142
105273
|
)
|
|
105143
105274
|
),
|
|
105144
105275
|
supportedInterfaceOrientations,
|
|
@@ -105148,11 +105279,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
|
|
|
105148
105279
|
bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
|
|
105149
105280
|
appIconArtwork: resolveNativeAppIconArtwork(
|
|
105150
105281
|
app.resources,
|
|
105151
|
-
(file) =>
|
|
105282
|
+
(file) => import_node_fs106.default.readFileSync(file, "utf8"),
|
|
105152
105283
|
(file) => {
|
|
105153
|
-
const extension =
|
|
105284
|
+
const extension = import_node_path108.default.extname(file).toLowerCase();
|
|
105154
105285
|
const contentType2 = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
|
|
105155
|
-
return `data:${contentType2};base64,${
|
|
105286
|
+
return `data:${contentType2};base64,${import_node_fs106.default.readFileSync(file).toString("base64")}`;
|
|
105156
105287
|
},
|
|
105157
105288
|
icons,
|
|
105158
105289
|
app.appIconName,
|
|
@@ -105188,41 +105319,41 @@ function readNativeAppIdentityFromProject(projectRoot, platform3, parseInfoPlist
|
|
|
105188
105319
|
function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
|
|
105189
105320
|
const files2 = {};
|
|
105190
105321
|
if (androidMergedManifest) {
|
|
105191
|
-
const file =
|
|
105192
|
-
if (!
|
|
105193
|
-
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");
|
|
105194
105325
|
} else {
|
|
105195
|
-
const androidRoot =
|
|
105196
|
-
if (!
|
|
105326
|
+
const androidRoot = import_node_path108.default.join(projectRoot, "android");
|
|
105327
|
+
if (!import_node_fs106.default.existsSync(androidRoot)) return null;
|
|
105197
105328
|
const collect = (directory2) => {
|
|
105198
|
-
for (const entry of
|
|
105199
|
-
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);
|
|
105200
105331
|
if (entry.isDirectory()) collect(file);
|
|
105201
105332
|
else if (entry.isFile() && entry.name === "AndroidManifest.xml")
|
|
105202
|
-
files2[
|
|
105333
|
+
files2[import_node_path108.default.relative(projectRoot, file).split(import_node_path108.default.sep).join("/")] = import_node_fs106.default.readFileSync(file, "utf8");
|
|
105203
105334
|
}
|
|
105204
105335
|
};
|
|
105205
|
-
for (const module2 of
|
|
105336
|
+
for (const module2 of import_node_fs106.default.readdirSync(androidRoot, { withFileTypes: true })) {
|
|
105206
105337
|
if (!module2.isDirectory()) continue;
|
|
105207
|
-
const outputs =
|
|
105338
|
+
const outputs = import_node_path108.default.join(
|
|
105208
105339
|
androidRoot,
|
|
105209
105340
|
module2.name,
|
|
105210
105341
|
"build/intermediates/merged_manifests"
|
|
105211
105342
|
);
|
|
105212
|
-
if (
|
|
105343
|
+
if (import_node_fs106.default.existsSync(outputs)) collect(outputs);
|
|
105213
105344
|
}
|
|
105214
105345
|
}
|
|
105215
105346
|
for (const manifest of Object.keys(files2)) {
|
|
105216
105347
|
const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
|
|
105217
105348
|
if (!resourceDirectory) continue;
|
|
105218
|
-
const absolute =
|
|
105219
|
-
if (!
|
|
105220
|
-
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 })) {
|
|
105221
105352
|
if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
|
|
105222
|
-
for (const resource of
|
|
105353
|
+
for (const resource of import_node_fs106.default.readdirSync(import_node_path108.default.join(absolute, entry.name))) {
|
|
105223
105354
|
if (!resource.endsWith(".xml")) continue;
|
|
105224
105355
|
const file = `${resourceDirectory}/${entry.name}/${resource}`;
|
|
105225
|
-
files2[file] =
|
|
105356
|
+
files2[file] = import_node_fs106.default.readFileSync(import_node_path108.default.resolve(projectRoot, file), "utf8");
|
|
105226
105357
|
}
|
|
105227
105358
|
}
|
|
105228
105359
|
}
|
|
@@ -105243,7 +105374,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
105243
105374
|
parseInfoPlist,
|
|
105244
105375
|
buildSdkVersion
|
|
105245
105376
|
);
|
|
105246
|
-
const projectManifestPath =
|
|
105377
|
+
const projectManifestPath = import_node_path108.default.join(projectRoot, "package.json");
|
|
105247
105378
|
const projectRequire = (0, import_node_module11.createRequire)(projectManifestPath);
|
|
105248
105379
|
let reanimatedManifestPath;
|
|
105249
105380
|
try {
|
|
@@ -105257,22 +105388,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
|
|
|
105257
105388
|
throw error;
|
|
105258
105389
|
}
|
|
105259
105390
|
const installedManifest = JSON.parse(
|
|
105260
|
-
|
|
105391
|
+
import_node_fs106.default.readFileSync(reanimatedManifestPath, "utf8")
|
|
105261
105392
|
);
|
|
105262
105393
|
const installedVersion2 = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
|
|
105263
105394
|
if (!installedVersion2) throw new Error("Reanimated package version is malformed");
|
|
105264
105395
|
if (Number.parseInt(installedVersion2, 10) < 4) return identity2;
|
|
105265
105396
|
const defaults = JSON.parse(
|
|
105266
|
-
|
|
105267
|
-
|
|
105268
|
-
|
|
105397
|
+
import_node_fs106.default.readFileSync(
|
|
105398
|
+
import_node_path108.default.join(
|
|
105399
|
+
import_node_path108.default.dirname(reanimatedManifestPath),
|
|
105269
105400
|
"src/featureFlags/staticFlags.json"
|
|
105270
105401
|
),
|
|
105271
105402
|
"utf8"
|
|
105272
105403
|
)
|
|
105273
105404
|
);
|
|
105274
105405
|
if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
|
|
105275
|
-
const manifest = JSON.parse(
|
|
105406
|
+
const manifest = JSON.parse(import_node_fs106.default.readFileSync(projectManifestPath, "utf8"));
|
|
105276
105407
|
const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
|
|
105277
105408
|
const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
|
|
105278
105409
|
if (overrides !== void 0 && !isRecord(overrides)) {
|
|
@@ -105303,13 +105434,13 @@ function readIosAppTarget(projectRoot, iosTarget, environment) {
|
|
|
105303
105434
|
environment
|
|
105304
105435
|
});
|
|
105305
105436
|
}
|
|
105306
|
-
var
|
|
105437
|
+
var import_node_fs106, import_node_module11, import_node_path108, SDK_BEFORE_SCENE_REQUIREMENT;
|
|
105307
105438
|
var init_native_app_identity_project = __esm({
|
|
105308
105439
|
"src/native-app-identity-project.ts"() {
|
|
105309
105440
|
"use strict";
|
|
105310
|
-
|
|
105441
|
+
import_node_fs106 = __toESM(require("node:fs"), 1);
|
|
105311
105442
|
import_node_module11 = require("node:module");
|
|
105312
|
-
|
|
105443
|
+
import_node_path108 = __toESM(require("node:path"), 1);
|
|
105313
105444
|
init_android_app_identity();
|
|
105314
105445
|
init_is_record();
|
|
105315
105446
|
init_native_app_identity();
|
|
@@ -105325,14 +105456,14 @@ var init_native_app_identity_project = __esm({
|
|
|
105325
105456
|
|
|
105326
105457
|
// src/native-firebase-config.ts
|
|
105327
105458
|
function resolveExpoConfigModule(appDir) {
|
|
105328
|
-
const expo = (0, import_node_module12.createRequire)(
|
|
105459
|
+
const expo = (0, import_node_module12.createRequire)(import_node_path109.default.join(appDir, "package.json")).resolve(
|
|
105329
105460
|
"expo/package.json"
|
|
105330
105461
|
);
|
|
105331
105462
|
return (0, import_node_module12.createRequire)(expo).resolve("@expo/config");
|
|
105332
105463
|
}
|
|
105333
105464
|
function hasExpoConfig(projectRoot) {
|
|
105334
|
-
const packagePath =
|
|
105335
|
-
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;
|
|
105336
105467
|
if (isRecord(manifest)) {
|
|
105337
105468
|
const dependencies = [manifest.dependencies, manifest.devDependencies].filter(
|
|
105338
105469
|
isRecord
|
|
@@ -105340,13 +105471,13 @@ function hasExpoConfig(projectRoot) {
|
|
|
105340
105471
|
if (dependencies.some((deps) => "one" in deps) && !dependencies.some((deps) => "expo" in deps))
|
|
105341
105472
|
return false;
|
|
105342
105473
|
}
|
|
105343
|
-
const appJsonPath =
|
|
105344
|
-
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;
|
|
105345
105476
|
const staticExpo = isRecord(appJson) && (isRecord(appJson.expo) || [appJson.ios, appJson.android].some(
|
|
105346
105477
|
(value) => isRecord(value) && typeof value.googleServicesFile === "string"
|
|
105347
105478
|
));
|
|
105348
105479
|
return staticExpo || ["app.config.js", "app.config.ts", "app.config.cjs", "app.config.mjs"].some(
|
|
105349
|
-
(name3) =>
|
|
105480
|
+
(name3) => import_node_fs107.default.existsSync(import_node_path109.default.join(projectRoot, name3))
|
|
105350
105481
|
);
|
|
105351
105482
|
}
|
|
105352
105483
|
function expoConfigArgs(projectRoot, resultPath) {
|
|
@@ -105354,7 +105485,7 @@ function expoConfigArgs(projectRoot, resultPath) {
|
|
|
105354
105485
|
"--input-type=commonjs",
|
|
105355
105486
|
"-e",
|
|
105356
105487
|
EXPO_CONFIG_SCRIPT,
|
|
105357
|
-
|
|
105488
|
+
import_node_path109.default.resolve(projectRoot),
|
|
105358
105489
|
resultPath
|
|
105359
105490
|
];
|
|
105360
105491
|
}
|
|
@@ -105367,14 +105498,14 @@ function readExpoConfigResult(resultPath, status, signal, stderr) {
|
|
|
105367
105498
|
throw new Error(
|
|
105368
105499
|
stderr || (signal ? `Expo native configuration evaluation was killed by ${signal}.` : "Expo native configuration evaluation failed.")
|
|
105369
105500
|
);
|
|
105370
|
-
const resolved = JSON.parse(
|
|
105501
|
+
const resolved = JSON.parse(import_node_fs107.default.readFileSync(resultPath, "utf8"));
|
|
105371
105502
|
if (!isRecord(resolved)) throw new Error("Expo native configuration is unavailable.");
|
|
105372
105503
|
return resolved;
|
|
105373
105504
|
}
|
|
105374
105505
|
function readExpoConfig(projectRoot) {
|
|
105375
105506
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
105376
105507
|
const directory2 = resultDirectory();
|
|
105377
|
-
const resultPath =
|
|
105508
|
+
const resultPath = import_node_path109.default.join(directory2, "config.json");
|
|
105378
105509
|
try {
|
|
105379
105510
|
const child = (0, import_node_child_process51.spawnSync)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
105380
105511
|
cwd: projectRoot,
|
|
@@ -105386,13 +105517,13 @@ function readExpoConfig(projectRoot) {
|
|
|
105386
105517
|
if (child.error) throw child.error;
|
|
105387
105518
|
return readExpoConfigResult(resultPath, child.status, child.signal, child.stderr);
|
|
105388
105519
|
} finally {
|
|
105389
|
-
|
|
105520
|
+
import_node_fs107.default.rmSync(directory2, { recursive: true, force: true });
|
|
105390
105521
|
}
|
|
105391
105522
|
}
|
|
105392
105523
|
async function readExpoConfigAsync(projectRoot) {
|
|
105393
105524
|
if (!hasExpoConfig(projectRoot)) return {};
|
|
105394
105525
|
const directory2 = resultDirectory();
|
|
105395
|
-
const resultPath =
|
|
105526
|
+
const resultPath = import_node_path109.default.join(directory2, "config.json");
|
|
105396
105527
|
try {
|
|
105397
105528
|
const child = (0, import_node_child_process51.spawn)("node", expoConfigArgs(projectRoot, resultPath), {
|
|
105398
105529
|
cwd: projectRoot,
|
|
@@ -105412,7 +105543,7 @@ async function readExpoConfigAsync(projectRoot) {
|
|
|
105412
105543
|
);
|
|
105413
105544
|
return readExpoConfigResult(resultPath, status, signal, stderr);
|
|
105414
105545
|
} finally {
|
|
105415
|
-
|
|
105546
|
+
import_node_fs107.default.rmSync(directory2, { recursive: true, force: true });
|
|
105416
105547
|
}
|
|
105417
105548
|
}
|
|
105418
105549
|
function splitStatements(raw2) {
|
|
@@ -105455,7 +105586,7 @@ function splitClauses(condition) {
|
|
|
105455
105586
|
function findHelper(type, name3, label, sources) {
|
|
105456
105587
|
const found2 = [];
|
|
105457
105588
|
for (const file of sources) {
|
|
105458
|
-
const raw2 =
|
|
105589
|
+
const raw2 = import_node_fs107.default.readFileSync(file, "utf8");
|
|
105459
105590
|
const blank = blankSwiftObjcLiterals(raw2);
|
|
105460
105591
|
if (file.endsWith(".swift") && label === void 0) {
|
|
105461
105592
|
const owners = type ? [
|
|
@@ -105541,7 +105672,7 @@ function evaluateSwiftBody(body, scope2, depth) {
|
|
|
105541
105672
|
}
|
|
105542
105673
|
function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
105543
105674
|
const plists = scope2.resources.filter(
|
|
105544
|
-
(file) =>
|
|
105675
|
+
(file) => import_node_path109.default.basename(file) === "GoogleService-Info.plist"
|
|
105545
105676
|
);
|
|
105546
105677
|
const variables = /* @__PURE__ */ new Map();
|
|
105547
105678
|
const literal6 = (text7) => {
|
|
@@ -105584,7 +105715,7 @@ function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
|
105584
105715
|
variables.set(name3, plists.length === 1 ? plists[0] : void 0);
|
|
105585
105716
|
} else if (dictionary3 && variables.has(dictionary3[1])) {
|
|
105586
105717
|
const file = variables.get(dictionary3[1]);
|
|
105587
|
-
const parsed2 = typeof file === "string" ? parsePlistSource(
|
|
105718
|
+
const parsed2 = typeof file === "string" ? parsePlistSource(import_node_fs107.default.readFileSync(file, "utf8")) : void 0;
|
|
105588
105719
|
variables.set(name3, isRecord(parsed2) ? parsed2 : void 0);
|
|
105589
105720
|
} else if (entry && variables.has(entry[1])) {
|
|
105590
105721
|
const key2 = literal6(entry[2]);
|
|
@@ -105597,7 +105728,7 @@ function evaluateObjcBody(body, bundle, constants5, scope2) {
|
|
|
105597
105728
|
}
|
|
105598
105729
|
function evaluateClauses(clauses, scope2, bound, depth) {
|
|
105599
105730
|
const sources = scope2.resources.filter(
|
|
105600
|
-
(file) =>
|
|
105731
|
+
(file) => import_node_path109.default.basename(file) === "GoogleService-Info.plist"
|
|
105601
105732
|
);
|
|
105602
105733
|
for (const clause of clauses) {
|
|
105603
105734
|
if (clause === "true") continue;
|
|
@@ -105614,7 +105745,7 @@ function evaluateClauses(clauses, scope2, bound, depth) {
|
|
|
105614
105745
|
const dictionary3 = /^let\s+(\w+)\s*=\s*NSDictionary\s*\(\s*contentsOfFile:\s*(\w+)\s*\)$/.exec(clause);
|
|
105615
105746
|
if (dictionary3 && typeof bound.get(dictionary3[2]) === "string") {
|
|
105616
105747
|
const parsed2 = parsePlistSource(
|
|
105617
|
-
|
|
105748
|
+
import_node_fs107.default.readFileSync(String(bound.get(dictionary3[2])), "utf8")
|
|
105618
105749
|
);
|
|
105619
105750
|
if (!isRecord(parsed2)) return false;
|
|
105620
105751
|
bound.set(dictionary3[1], parsed2);
|
|
@@ -105703,7 +105834,7 @@ function findDefaultConfigureCall(body, sources) {
|
|
|
105703
105834
|
const [, type, name3] = call;
|
|
105704
105835
|
for (const file of sources) {
|
|
105705
105836
|
if (!file.endsWith(".swift")) continue;
|
|
105706
|
-
const source = blankSwiftObjcLiterals(
|
|
105837
|
+
const source = blankSwiftObjcLiterals(import_node_fs107.default.readFileSync(file, "utf8"));
|
|
105707
105838
|
const declaration = new RegExp(
|
|
105708
105839
|
`\\b(?:enum|struct|class)\\s+${type}\\b[^{]*\\{`
|
|
105709
105840
|
).exec(source);
|
|
@@ -105725,10 +105856,10 @@ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGen
|
|
|
105725
105856
|
prepareGeneratedSources
|
|
105726
105857
|
});
|
|
105727
105858
|
const delegates = app.allSources.filter(
|
|
105728
|
-
(file) => /^AppDelegate\.(swift|mm|m)$/.test(
|
|
105859
|
+
(file) => /^AppDelegate\.(swift|mm|m)$/.test(import_node_path109.default.basename(file))
|
|
105729
105860
|
);
|
|
105730
105861
|
const defaultConfigured = delegates.some((file) => {
|
|
105731
|
-
const raw2 =
|
|
105862
|
+
const raw2 = import_node_fs107.default.readFileSync(file, "utf8");
|
|
105732
105863
|
const source = blankSwiftObjcLiterals(raw2);
|
|
105733
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(
|
|
105734
105865
|
source
|
|
@@ -105799,17 +105930,17 @@ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGen
|
|
|
105799
105930
|
return guarded;
|
|
105800
105931
|
});
|
|
105801
105932
|
if (!defaultConfigured) return null;
|
|
105802
|
-
const bundle =
|
|
105933
|
+
const bundle = import_node_path109.default.join(
|
|
105803
105934
|
app.settings("BUILT_PRODUCTS_DIR"),
|
|
105804
105935
|
app.settings("WRAPPER_NAME") || `${app.settings("PRODUCT_NAME")}.app`
|
|
105805
105936
|
);
|
|
105806
105937
|
const staged = app.copiedFiles.filter(
|
|
105807
|
-
({ from, to }) => to ===
|
|
105808
|
-
).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));
|
|
105809
105940
|
const resources = [
|
|
105810
105941
|
.../* @__PURE__ */ new Set([
|
|
105811
105942
|
...app.resources.filter(
|
|
105812
|
-
(file) => /^GoogleService-Info\.plist$/.test(
|
|
105943
|
+
(file) => /^GoogleService-Info\.plist$/.test(import_node_path109.default.basename(file))
|
|
105813
105944
|
),
|
|
105814
105945
|
...staged
|
|
105815
105946
|
])
|
|
@@ -105818,7 +105949,7 @@ function readTargetGoogleServicesFile(projectRoot, container, target, prepareGen
|
|
|
105818
105949
|
throw new Error(
|
|
105819
105950
|
"native Firebase default initialization requires one GoogleService-Info.plist build resource"
|
|
105820
105951
|
);
|
|
105821
|
-
return
|
|
105952
|
+
return import_node_path109.default.relative(import_node_fs107.default.realpathSync(projectRoot), resources[0]);
|
|
105822
105953
|
}
|
|
105823
105954
|
function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"], iosTarget, config = readExpoConfig(projectRoot), prepareGeneratedSources = false) {
|
|
105824
105955
|
const result = {};
|
|
@@ -105839,8 +105970,8 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
105839
105970
|
const native = config[platform3];
|
|
105840
105971
|
if (!isRecord(native) || typeof native.googleServicesFile !== "string") continue;
|
|
105841
105972
|
try {
|
|
105842
|
-
const source =
|
|
105843
|
-
|
|
105973
|
+
const source = import_node_fs107.default.readFileSync(
|
|
105974
|
+
import_node_path109.default.resolve(projectRoot, native.googleServicesFile),
|
|
105844
105975
|
"utf8"
|
|
105845
105976
|
);
|
|
105846
105977
|
const parsed2 = platform3 === "ios" ? parsePlistSource(source) : JSON.parse(source);
|
|
@@ -105892,15 +106023,15 @@ function readNativeFirebaseConfig(projectRoot, platforms2 = ["ios", "android"],
|
|
|
105892
106023
|
}
|
|
105893
106024
|
return result;
|
|
105894
106025
|
}
|
|
105895
|
-
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;
|
|
105896
106027
|
var init_native_firebase_config = __esm({
|
|
105897
106028
|
"src/native-firebase-config.ts"() {
|
|
105898
106029
|
"use strict";
|
|
105899
106030
|
import_node_child_process51 = require("node:child_process");
|
|
105900
|
-
|
|
106031
|
+
import_node_fs107 = __toESM(require("node:fs"), 1);
|
|
105901
106032
|
import_node_module12 = require("node:module");
|
|
105902
106033
|
import_node_os22 = __toESM(require("node:os"), 1);
|
|
105903
|
-
|
|
106034
|
+
import_node_path109 = __toESM(require("node:path"), 1);
|
|
105904
106035
|
init_is_record();
|
|
105905
106036
|
init_plist();
|
|
105906
106037
|
init_xcode_project();
|
|
@@ -105921,7 +106052,7 @@ const result = JSON.stringify(getConfig(root, { skipSDKVersionRequirement: true
|
|
|
105921
106052
|
if (Buffer.byteLength(result) > 1024 * 1024) throw new Error('Expo native configuration exceeds 1 MiB.');
|
|
105922
106053
|
writeFileSync(process.argv[2], result, { mode: 0o600 });`;
|
|
105923
106054
|
EXPO_CONFIG_TIMEOUT_MS = 3e4;
|
|
105924
|
-
resultDirectory = () =>
|
|
106055
|
+
resultDirectory = () => import_node_fs107.default.mkdtempSync(import_node_path109.default.join(import_node_os22.default.tmpdir(), "peach-expo-config-"));
|
|
105925
106056
|
HELPER_DEPTH = 3;
|
|
105926
106057
|
stripComments = (raw2) => raw2.replace(
|
|
105927
106058
|
/\/\*[\s\S]*?\*\/|\/\/[^\n]*|"(?:\\.|[^"\\])*"/g,
|
|
@@ -106028,12 +106159,12 @@ var init_nitroContract = __esm({
|
|
|
106028
106159
|
function hashPackageTree(root, options2) {
|
|
106029
106160
|
const files2 = [];
|
|
106030
106161
|
const walk4 = (directory2, relative7) => {
|
|
106031
|
-
for (const entry of (0,
|
|
106162
|
+
for (const entry of (0, import_node_fs108.readdirSync)(directory2, { withFileTypes: true }).sort(
|
|
106032
106163
|
(a, b) => options2.compareNames(a.name, b.name)
|
|
106033
106164
|
)) {
|
|
106034
106165
|
if (entry.name === "node_modules") continue;
|
|
106035
106166
|
const path195 = `${relative7}${entry.name}`;
|
|
106036
|
-
if (entry.isDirectory()) walk4((0,
|
|
106167
|
+
if (entry.isDirectory()) walk4((0, import_node_path110.join)(directory2, entry.name), `${path195}/`);
|
|
106037
106168
|
else if (entry.isFile() && !options2.skipFile?.(entry.name)) files2.push(path195);
|
|
106038
106169
|
}
|
|
106039
106170
|
};
|
|
@@ -106042,7 +106173,7 @@ function hashPackageTree(root, options2) {
|
|
|
106042
106173
|
return (async () => {
|
|
106043
106174
|
for (let start = 0; start < files2.length; start += READ_AHEAD) {
|
|
106044
106175
|
const batch = files2.slice(start, start + READ_AHEAD);
|
|
106045
|
-
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))));
|
|
106046
106177
|
batch.forEach((file, index) => hash.update(`${file}\0`).update(bytes[index]));
|
|
106047
106178
|
}
|
|
106048
106179
|
return hash.digest("hex");
|
|
@@ -106059,14 +106190,14 @@ function nativePackageTreeDigest(root) {
|
|
|
106059
106190
|
skipFile: (name3) => name3.endsWith(".d.ts") || name3.endsWith(".d.ts.map") || name3.endsWith(".js.map")
|
|
106060
106191
|
});
|
|
106061
106192
|
}
|
|
106062
|
-
var import_node_crypto64,
|
|
106193
|
+
var import_node_crypto64, import_node_fs108, import_promises12, import_node_path110, READ_AHEAD;
|
|
106063
106194
|
var init_package_tree_digest = __esm({
|
|
106064
106195
|
"src/package-tree-digest.ts"() {
|
|
106065
106196
|
"use strict";
|
|
106066
106197
|
import_node_crypto64 = require("node:crypto");
|
|
106067
|
-
|
|
106198
|
+
import_node_fs108 = require("node:fs");
|
|
106068
106199
|
import_promises12 = require("node:fs/promises");
|
|
106069
|
-
|
|
106200
|
+
import_node_path110 = require("node:path");
|
|
106070
106201
|
READ_AHEAD = 64;
|
|
106071
106202
|
}
|
|
106072
106203
|
});
|
|
@@ -106092,16 +106223,16 @@ function packageRootOf(appRoot, file) {
|
|
|
106092
106223
|
if (parts2[0] !== "node_modules") return null;
|
|
106093
106224
|
const at = parts2.lastIndexOf("node_modules") + 1;
|
|
106094
106225
|
const end = at + (parts2[at]?.startsWith("@") ? 2 : 1);
|
|
106095
|
-
return parts2.length > end ?
|
|
106226
|
+
return parts2.length > end ? import_node_path111.default.join(appRoot, ...parts2.slice(0, end)) : null;
|
|
106096
106227
|
}
|
|
106097
106228
|
async function expoNativeInputs(appRoot) {
|
|
106098
|
-
appRoot =
|
|
106099
|
-
if (findXcodeProject(
|
|
106100
|
-
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"));
|
|
106101
106232
|
let fingerprintEntry;
|
|
106102
106233
|
try {
|
|
106103
106234
|
fingerprintEntry = appRequire.resolve("@expo/fingerprint", {
|
|
106104
|
-
paths: [
|
|
106235
|
+
paths: [import_node_path111.default.dirname(appRequire.resolve("expo/package.json"))]
|
|
106105
106236
|
});
|
|
106106
106237
|
} catch {
|
|
106107
106238
|
return null;
|
|
@@ -106127,7 +106258,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
106127
106258
|
const root = (source.type === "package" || source.type === "dir") && source.filePath ? packageRootOf(appRoot, source.filePath) : null;
|
|
106128
106259
|
if (!root) continue;
|
|
106129
106260
|
const manifest = JSON.parse(
|
|
106130
|
-
|
|
106261
|
+
import_node_fs109.default.readFileSync(import_node_path111.default.join(root, "package.json"), "utf8")
|
|
106131
106262
|
);
|
|
106132
106263
|
if (!isRecord(manifest) || typeof manifest.name !== "string")
|
|
106133
106264
|
throw new Error(`${root}: package has no name`);
|
|
@@ -106135,7 +106266,7 @@ async function expoNativeInputs(appRoot) {
|
|
|
106135
106266
|
}
|
|
106136
106267
|
packages.set(
|
|
106137
106268
|
"react-native",
|
|
106138
|
-
|
|
106269
|
+
import_node_path111.default.dirname(appRequire.resolve("react-native/package.json"))
|
|
106139
106270
|
);
|
|
106140
106271
|
return {
|
|
106141
106272
|
inputs: {
|
|
@@ -106196,7 +106327,7 @@ function readExpoNativeEntry(value) {
|
|
|
106196
106327
|
};
|
|
106197
106328
|
}
|
|
106198
106329
|
async function answer(appRoot) {
|
|
106199
|
-
if (findXcodeProject(
|
|
106330
|
+
if (findXcodeProject(import_node_path111.default.join(appRoot, "ios"))) return null;
|
|
106200
106331
|
const [source, config] = await Promise.all([
|
|
106201
106332
|
hashExpoSourceWorkspace(appRoot),
|
|
106202
106333
|
readExpoConfigAsync(appRoot)
|
|
@@ -106226,7 +106357,7 @@ async function lookup2(appRoot) {
|
|
|
106226
106357
|
}
|
|
106227
106358
|
function prebuiltExpoNative(appRoot, iosTarget) {
|
|
106228
106359
|
if (iosTarget !== void 0) return Promise.resolve(null);
|
|
106229
|
-
const root =
|
|
106360
|
+
const root = import_node_fs109.default.realpathSync(appRoot);
|
|
106230
106361
|
let pending2 = lookups.get(root);
|
|
106231
106362
|
if (!pending2) {
|
|
106232
106363
|
pending2 = answer(root).finally(() => lookups.delete(root));
|
|
@@ -106236,20 +106367,20 @@ function prebuiltExpoNative(appRoot, iosTarget) {
|
|
|
106236
106367
|
}
|
|
106237
106368
|
async function prebuiltAppTarget(appRoot, signal, dependencies = "lockfile") {
|
|
106238
106369
|
const prepared = await prepareExpoNativeProject(
|
|
106239
|
-
|
|
106370
|
+
import_node_fs109.default.realpathSync(appRoot),
|
|
106240
106371
|
signal,
|
|
106241
106372
|
dependencies
|
|
106242
106373
|
);
|
|
106243
|
-
const ios =
|
|
106244
|
-
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"));
|
|
106245
106376
|
if (projects2.length !== 1) throw new Error(`expected one Xcode project in ${ios}`);
|
|
106246
|
-
return readXcodeAppTarget(
|
|
106377
|
+
return readXcodeAppTarget(import_node_path111.default.join(ios, projects2[0]), void 0, "Debug", {
|
|
106247
106378
|
requireSources: false
|
|
106248
106379
|
});
|
|
106249
106380
|
}
|
|
106250
106381
|
function isManagedExpoApp(appRoot) {
|
|
106251
|
-
return !findXcodeProject(
|
|
106252
|
-
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")),
|
|
106253
106384
|
"expo"
|
|
106254
106385
|
);
|
|
106255
106386
|
}
|
|
@@ -106261,7 +106392,7 @@ async function managedExpoNativeAppIdentity(appRoot, iosTarget) {
|
|
|
106261
106392
|
}
|
|
106262
106393
|
function servedExpoSwift(appRoot, entry, app) {
|
|
106263
106394
|
if (!entry.expoSwift) return null;
|
|
106264
|
-
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`;
|
|
106265
106396
|
if (app.infoPlist === null) throw new Error("the prebuilt app target has no Info.plist");
|
|
106266
106397
|
const installed2 = installedInfoPlist(app.infoPlist, entry.infoPlist);
|
|
106267
106398
|
const infoPlist2 = Buffer.from(installed2).toString("base64");
|
|
@@ -106289,14 +106420,14 @@ async function prebuiltExpoSwiftResult(appRoot, entry, signal) {
|
|
|
106289
106420
|
await prebuiltAppTarget(appRoot, signal, "installed")
|
|
106290
106421
|
);
|
|
106291
106422
|
}
|
|
106292
|
-
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;
|
|
106293
106424
|
var init_expo_native_prebuilt = __esm({
|
|
106294
106425
|
"src/expo-native-prebuilt.ts"() {
|
|
106295
106426
|
"use strict";
|
|
106296
106427
|
import_node_crypto65 = require("node:crypto");
|
|
106297
|
-
|
|
106428
|
+
import_node_fs109 = __toESM(require("node:fs"), 1);
|
|
106298
106429
|
import_node_module13 = require("node:module");
|
|
106299
|
-
|
|
106430
|
+
import_node_path111 = __toESM(require("node:path"), 1);
|
|
106300
106431
|
import_node_util14 = require("node:util");
|
|
106301
106432
|
init_answeredNativePackages();
|
|
106302
106433
|
init_expo_native_compiler_digest();
|
|
@@ -106324,8 +106455,8 @@ var init_expo_native_prebuilt = __esm({
|
|
|
106324
106455
|
|
|
106325
106456
|
// src/native-preparation.ts
|
|
106326
106457
|
function ignoredChange(relative7) {
|
|
106327
|
-
const parts2 = relative7.split(
|
|
106328
|
-
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(
|
|
106329
106460
|
relative7
|
|
106330
106461
|
);
|
|
106331
106462
|
}
|
|
@@ -106347,7 +106478,7 @@ function watchNativeInputs(root) {
|
|
|
106347
106478
|
}
|
|
106348
106479
|
const inputs2 = { expiry, revision: (0, import_node_crypto66.randomUUID)() };
|
|
106349
106480
|
const watch4 = (directory2, recursive, name3) => {
|
|
106350
|
-
const watcher =
|
|
106481
|
+
const watcher = import_node_fs110.default.watch(
|
|
106351
106482
|
directory2,
|
|
106352
106483
|
{ recursive, persistent: false },
|
|
106353
106484
|
(_event, file) => {
|
|
@@ -106360,17 +106491,17 @@ function watchNativeInputs(root) {
|
|
|
106360
106491
|
const scan3 = (directory2, watchRoot2) => {
|
|
106361
106492
|
if (visited.has(directory2)) return;
|
|
106362
106493
|
visited.add(directory2);
|
|
106363
|
-
for (const entry of
|
|
106364
|
-
const file =
|
|
106365
|
-
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;
|
|
106366
106497
|
if (entry.isDirectory()) scan3(file, watchRoot2);
|
|
106367
106498
|
if (!entry.isSymbolicLink()) continue;
|
|
106368
|
-
const target =
|
|
106369
|
-
if (target === workspace || target.startsWith(workspace +
|
|
106370
|
-
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);
|
|
106371
106502
|
if (visited.has(real)) continue;
|
|
106372
|
-
watch4(
|
|
106373
|
-
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()) {
|
|
106374
106505
|
watch4(real, true);
|
|
106375
106506
|
scan3(real, real);
|
|
106376
106507
|
} else visited.add(real);
|
|
@@ -106390,13 +106521,13 @@ function nativeInputRevision(root) {
|
|
|
106390
106521
|
const inputs2 = watchNativeInputs(root);
|
|
106391
106522
|
if (inputs2) return JSON.stringify([inputs2.revision, resolveActiveRuntimeRoot()]);
|
|
106392
106523
|
}
|
|
106393
|
-
var import_node_crypto66,
|
|
106524
|
+
var import_node_crypto66, import_node_fs110, import_node_path112, import_node_timers2, setTimeoutNode, RETENTION_MS, watchedInputs, NativePreparation;
|
|
106394
106525
|
var init_native_preparation = __esm({
|
|
106395
106526
|
"src/native-preparation.ts"() {
|
|
106396
106527
|
"use strict";
|
|
106397
106528
|
import_node_crypto66 = require("node:crypto");
|
|
106398
|
-
|
|
106399
|
-
|
|
106529
|
+
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
106530
|
+
import_node_path112 = __toESM(require("node:path"), 1);
|
|
106400
106531
|
import_node_timers2 = require("node:timers");
|
|
106401
106532
|
init_nativePreparationContract();
|
|
106402
106533
|
init_runtime_assets();
|
|
@@ -106460,87 +106591,6 @@ var init_native_preparation = __esm({
|
|
|
106460
106591
|
}
|
|
106461
106592
|
});
|
|
106462
106593
|
|
|
106463
|
-
// src/swift-xcframework.ts
|
|
106464
|
-
function simulatorNativeLibrary(dir) {
|
|
106465
|
-
if (dir.endsWith(".framework")) {
|
|
106466
|
-
const name3 = import_node_path112.default.basename(dir, ".framework");
|
|
106467
|
-
return { name: name3, file: import_node_path112.default.join(dir, name3), kind: "framework" };
|
|
106468
|
-
}
|
|
106469
|
-
if (!dir.endsWith(".xcframework")) return null;
|
|
106470
|
-
const info = parsePlistBytes(import_node_fs110.default.readFileSync(import_node_path112.default.join(dir, "Info.plist")));
|
|
106471
|
-
if (!isRecord(info) || !Array.isArray(info.AvailableLibraries))
|
|
106472
|
-
throw new Error(`${dir}: invalid XCFramework library declarations`);
|
|
106473
|
-
const matches = [];
|
|
106474
|
-
for (const entry of info.AvailableLibraries) {
|
|
106475
|
-
if (!isRecord(entry)) throw new Error(`${dir}: invalid XCFramework library entry`);
|
|
106476
|
-
if (entry.SupportedPlatform !== "ios" || entry.SupportedPlatformVariant !== "simulator")
|
|
106477
|
-
continue;
|
|
106478
|
-
if (typeof entry.LibraryPath !== "string" || typeof entry.LibraryIdentifier !== "string")
|
|
106479
|
-
throw new Error(`${dir}: invalid simulator library paths`);
|
|
106480
|
-
const archive = /\.a$/.test(entry.LibraryPath);
|
|
106481
|
-
const framework = /\.framework$/.test(entry.LibraryPath);
|
|
106482
|
-
if (!archive && !framework) continue;
|
|
106483
|
-
const bundle = import_node_path112.default.resolve(dir, entry.LibraryIdentifier, entry.LibraryPath);
|
|
106484
|
-
const bundleRelative = import_node_path112.default.relative(dir, bundle);
|
|
106485
|
-
if (bundleRelative.startsWith("..") || import_node_path112.default.isAbsolute(bundleRelative))
|
|
106486
|
-
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
106487
|
-
let name3 = entry.LibraryPath;
|
|
106488
|
-
let file = bundle;
|
|
106489
|
-
if (framework) {
|
|
106490
|
-
name3 = import_node_path112.default.basename(bundle, ".framework");
|
|
106491
|
-
file = import_node_path112.default.join(bundle, name3);
|
|
106492
|
-
}
|
|
106493
|
-
const relative7 = import_node_path112.default.relative(dir, file);
|
|
106494
|
-
if (relative7.startsWith("..") || import_node_path112.default.isAbsolute(relative7))
|
|
106495
|
-
throw new Error(`${dir}: library escapes its XCFramework`);
|
|
106496
|
-
if (framework) {
|
|
106497
|
-
matches.push({ name: name3, file, kind: "framework" });
|
|
106498
|
-
continue;
|
|
106499
|
-
}
|
|
106500
|
-
const slice = import_node_path112.default.resolve(dir, entry.LibraryIdentifier);
|
|
106501
|
-
const headers = typeof entry.HeadersPath === "string" ? import_node_path112.default.resolve(slice, entry.HeadersPath) : void 0;
|
|
106502
|
-
if (headers && relativeInside(slice, headers) === null)
|
|
106503
|
-
throw new Error(`${dir}: headers escape their XCFramework slice`);
|
|
106504
|
-
matches.push({ name: name3, file, kind: "archive", headers });
|
|
106505
|
-
}
|
|
106506
|
-
if (matches.length === 0) return null;
|
|
106507
|
-
if (matches.length !== 1) throw new Error(`${dir}: ambiguous simulator library`);
|
|
106508
|
-
return matches[0];
|
|
106509
|
-
}
|
|
106510
|
-
function isDynamicLibrary2(file) {
|
|
106511
|
-
const fd = import_node_fs110.default.openSync(file, "r");
|
|
106512
|
-
try {
|
|
106513
|
-
const read2 = (offset) => {
|
|
106514
|
-
const bytes = Buffer.alloc(16);
|
|
106515
|
-
import_node_fs110.default.readSync(fd, bytes, 0, 16, offset);
|
|
106516
|
-
return bytes;
|
|
106517
|
-
};
|
|
106518
|
-
let header = read2(0);
|
|
106519
|
-
const universal = header.readUInt32BE(0);
|
|
106520
|
-
if (universal === 3405691582 || universal === 3405691583) {
|
|
106521
|
-
const arch = read2(8);
|
|
106522
|
-
header = read2(
|
|
106523
|
-
universal === 3405691582 ? arch.readUInt32BE(8) : Number(arch.readBigUInt64BE(8))
|
|
106524
|
-
);
|
|
106525
|
-
}
|
|
106526
|
-
const magic = header.readUInt32LE(0);
|
|
106527
|
-
return (magic === 4277009103 || magic === 4277009102) && header.readUInt32LE(12) === 6;
|
|
106528
|
-
} finally {
|
|
106529
|
-
import_node_fs110.default.closeSync(fd);
|
|
106530
|
-
}
|
|
106531
|
-
}
|
|
106532
|
-
var import_node_fs110, import_node_path112;
|
|
106533
|
-
var init_swift_xcframework = __esm({
|
|
106534
|
-
"src/swift-xcframework.ts"() {
|
|
106535
|
-
"use strict";
|
|
106536
|
-
import_node_fs110 = __toESM(require("node:fs"), 1);
|
|
106537
|
-
import_node_path112 = __toESM(require("node:path"), 1);
|
|
106538
|
-
init_is_record();
|
|
106539
|
-
init_plist_bytes();
|
|
106540
|
-
init_swift_source_file();
|
|
106541
|
-
}
|
|
106542
|
-
});
|
|
106543
|
-
|
|
106544
106594
|
// src/native-static-libraries.ts
|
|
106545
106595
|
function nonmodularFrameworkLibraries(directories, moduleRoot) {
|
|
106546
106596
|
return [
|
|
@@ -128333,7 +128383,7 @@ var init_installed_native_libraries = __esm({
|
|
|
128333
128383
|
// src/turbo-codegen-intake.ts
|
|
128334
128384
|
function installedRendererDependencyGlobs(reactNativeRoot, appRoot) {
|
|
128335
128385
|
return Object.fromEntries(
|
|
128336
|
-
|
|
128386
|
+
RENDERER_DEPENDENCY_PODS.map((name3) => {
|
|
128337
128387
|
const spec = loadPodspec(
|
|
128338
128388
|
import_node_path140.default.join(reactNativeRoot, "third-party-podspecs", `${name3}.podspec`),
|
|
128339
128389
|
appRoot
|
|
@@ -128451,7 +128501,7 @@ async function runInstalledTurboCodegen(appRoot, outDir, signal) {
|
|
|
128451
128501
|
files: hashTree(generatedRoot)
|
|
128452
128502
|
};
|
|
128453
128503
|
}
|
|
128454
|
-
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;
|
|
128455
128505
|
var init_turbo_codegen_intake = __esm({
|
|
128456
128506
|
"src/turbo-codegen-intake.ts"() {
|
|
128457
128507
|
"use strict";
|
|
@@ -128466,6 +128516,7 @@ var init_turbo_codegen_intake = __esm({
|
|
|
128466
128516
|
init_nitro_source();
|
|
128467
128517
|
init_podspec_sources();
|
|
128468
128518
|
run12 = (0, import_node_util17.promisify)(import_node_child_process68.execFile);
|
|
128519
|
+
RENDERER_DEPENDENCY_PODS = ["RCT-Folly", "DoubleConversion", "fmt"];
|
|
128469
128520
|
RENDERER_PODS = /* @__PURE__ */ new Set([
|
|
128470
128521
|
"React-Fabric",
|
|
128471
128522
|
"React-FabricComponents",
|
|
@@ -134379,7 +134430,7 @@ var init_react_native_core = __esm({
|
|
|
134379
134430
|
init_swift_distribution();
|
|
134380
134431
|
init_swift_package();
|
|
134381
134432
|
init_swiftContract();
|
|
134382
|
-
recipe = true ? "
|
|
134433
|
+
recipe = true ? "db2c81d6628055a561c22667b098e4686f9d8924ffb229c4c7d9e15a25182502" : reactNativeCoreDigest2(__sootsim_import_meta_dirname);
|
|
134383
134434
|
strings4 = (value) => isRecord(value) && Object.values(value).every((item) => typeof item === "string");
|
|
134384
134435
|
building = /* @__PURE__ */ new Map();
|
|
134385
134436
|
}
|
|
@@ -134970,6 +135021,8 @@ function enrichInstalledUnits(units, installed2, namespaceGroups, provided, modu
|
|
|
134970
135021
|
return originals.some((file) => import_node_fs144.default.realpathSync(file).startsWith(reactNativeRoot)) ? [target.name] : [];
|
|
134971
135022
|
})
|
|
134972
135023
|
);
|
|
135024
|
+
for (const name3 of RENDERER_DEPENDENCY_PODS)
|
|
135025
|
+
if (targetByName.has(name3)) reactTargets.add(name3);
|
|
134973
135026
|
for (const [file, source] of Object.entries(installed2.sourcePaths)) {
|
|
134974
135027
|
if (!file.endsWith(".swift") || !import_node_fs144.default.realpathSync(source).startsWith(reactNativeRoot))
|
|
134975
135028
|
continue;
|
|
@@ -136726,8 +136779,8 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136726
136779
|
return prepared;
|
|
136727
136780
|
}
|
|
136728
136781
|
}
|
|
136729
|
-
const link = async (linked2) => {
|
|
136730
|
-
const packagePath = expoSwiftPackage(key2,
|
|
136782
|
+
const link = async (linked2, name3 = "linked-app") => {
|
|
136783
|
+
const packagePath = expoSwiftPackage(key2, name3);
|
|
136731
136784
|
preparePackage2(linked2, packagePath);
|
|
136732
136785
|
signal.throwIfAborted();
|
|
136733
136786
|
const stamp = sourceContentStamp(packagePath, module2.root);
|
|
@@ -136785,35 +136838,24 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136785
136838
|
error instanceof SwiftMissingModulesError ? [...message.matchAll(/^ (\S+)/gm)].map((match) => match[1]) : []
|
|
136786
136839
|
);
|
|
136787
136840
|
return pool.filter(
|
|
136788
|
-
(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(
|
|
136789
136850
|
(name3) => nativeCopies.includes(name3) || errorFiles.some((file) => file === name3 || file.endsWith(`/${name3}`))
|
|
136790
136851
|
) || Object.values(unit2.files).some(
|
|
136791
136852
|
(source) => swiftImportNames(source).some((name3) => missing2.has(name3))
|
|
136792
136853
|
)
|
|
136793
136854
|
);
|
|
136794
136855
|
};
|
|
136795
|
-
let checked = candidates;
|
|
136796
136856
|
linked = [];
|
|
136797
|
-
let
|
|
136798
|
-
|
|
136799
|
-
for (; ; ) {
|
|
136800
|
-
const named = namedBy(failure3, rest);
|
|
136801
|
-
if (named.length === 0 || named.length === rest.length) break;
|
|
136802
|
-
rest = rest.filter((unit2) => !named.includes(unit2));
|
|
136803
|
-
report(`linking ${rest.length} namespaces the diagnostic does not name`);
|
|
136804
|
-
try {
|
|
136805
|
-
artifact = await link(rest);
|
|
136806
|
-
linked = rest;
|
|
136807
|
-
checked = candidates.filter((unit2) => !rest.includes(unit2));
|
|
136808
|
-
break;
|
|
136809
|
-
} catch (error) {
|
|
136810
|
-
signal.throwIfAborted();
|
|
136811
|
-
if (error instanceof ExpoSwiftLinkRefusal) throw error;
|
|
136812
|
-
failure3 = error;
|
|
136813
|
-
}
|
|
136814
|
-
}
|
|
136815
|
-
const linkedWithoutChecks = linked.length;
|
|
136816
|
-
for (const unit2 of checked) {
|
|
136857
|
+
let isolatedArtifact;
|
|
136858
|
+
const check2 = async (unit2) => {
|
|
136817
136859
|
signal.throwIfAborted();
|
|
136818
136860
|
const packagePath = expoSwiftPackage(key2, unit2.moduleId);
|
|
136819
136861
|
preparePackage2([unit2], packagePath);
|
|
@@ -136863,9 +136905,43 @@ async function compileExpoSwiftModulesTraced(root, base2, publishArtifact, optio
|
|
|
136863
136905
|
unitErrors.length ? unitErrors.join("\n") : diagnostic
|
|
136864
136906
|
);
|
|
136865
136907
|
}
|
|
136866
|
-
}
|
|
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);
|
|
136867
136941
|
if (linked.length === candidates.length) throw linkError;
|
|
136868
|
-
if (
|
|
136942
|
+
if (isolatedArtifact?.units.length === linked.length)
|
|
136943
|
+
artifact = isolatedArtifact.artifact;
|
|
136944
|
+
else if (linked.length) {
|
|
136869
136945
|
try {
|
|
136870
136946
|
artifact = await link(linked);
|
|
136871
136947
|
} catch (error) {
|
|
@@ -137062,6 +137138,7 @@ var init_expo_swift_host = __esm({
|
|
|
137062
137138
|
init_swift_standins();
|
|
137063
137139
|
init_swift_submit();
|
|
137064
137140
|
init_swift_toolchain();
|
|
137141
|
+
init_turbo_codegen_intake();
|
|
137065
137142
|
init_turbo_source();
|
|
137066
137143
|
run13 = (0, import_node_util19.promisify)(import_node_child_process71.execFile);
|
|
137067
137144
|
scriptEnv = { ...process.env, [PEACH_FORKED_SCRIPT_ENV]: "1" };
|
|
@@ -151548,7 +151625,7 @@ var init_nitro_superset = __esm({
|
|
|
151548
151625
|
init_nitroContract();
|
|
151549
151626
|
init_swift_standin_digest();
|
|
151550
151627
|
NITRO_SUPERSET_ENTRY_NAME = "superset";
|
|
151551
|
-
NITRO_COMPILER_DIGEST = true ? "
|
|
151628
|
+
NITRO_COMPILER_DIGEST = true ? "744976c15724422db8f3bc8d1fdfdcf68c3f91b185210a50951930d2ea18c38e" : nitroCompilerSourceDigest(__sootsim_import_meta_dirname, STANDIN_SOURCE_DIGEST2);
|
|
151552
151629
|
nitroSupersetLock = parseLock(nitro_superset_lock_default);
|
|
151553
151630
|
nitroSupersetKey = (inputs2) => nativeEntryKey({ ...inputs2, compiler: NITRO_COMPILER_DIGEST });
|
|
151554
151631
|
published3 = /* @__PURE__ */ new Map();
|