peachsim 0.1.2439 → 0.1.2441

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.
Files changed (143) hide show
  1. package/dist-lib/agent-daemon-client.cjs +1 -1
  2. package/dist-lib/agent-events.cjs +1 -1
  3. package/dist-lib/attached-projects.cjs +1 -1
  4. package/dist-lib/auth/shared-session.cjs +1 -1
  5. package/dist-lib/backend-origin.cjs +1 -1
  6. package/dist-lib/beta.cjs +1 -1
  7. package/dist-lib/beta.mjs +2 -2
  8. package/dist-lib/bridge-constants.cjs +1 -1
  9. package/dist-lib/bridge-contract-input.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.mjs +5 -5
  11. package/dist-lib/bridge-contract.cjs +1 -1
  12. package/dist-lib/bridge-contract.mjs +3 -3
  13. package/dist-lib/bundle-channel.cjs +8180 -8397
  14. package/dist-lib/capture-contract.cjs +1 -1
  15. package/dist-lib/capture-contract.mjs +3 -3
  16. package/dist-lib/cloud-contract.cjs +1 -1
  17. package/dist-lib/cloud-contract.mjs +3 -3
  18. package/dist-lib/cloud-test-args.cjs +1 -1
  19. package/dist-lib/cloud-test-args.mjs +2 -2
  20. package/dist-lib/cloud.cjs +1 -1
  21. package/dist-lib/cloud.mjs +7 -7
  22. package/dist-lib/config.cjs +1 -1
  23. package/dist-lib/config.mjs +5 -5
  24. package/dist-lib/detox/index.cjs +2 -2
  25. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  26. package/dist-lib/esm-chunks/{acorn-FGE4PYDJ.mjs → acorn-FRQNHKFC.mjs} +3 -3
  27. package/dist-lib/esm-chunks/{chunk-HIDNO3RP.mjs → chunk-4BZ3Z3IQ.mjs} +18 -18
  28. package/dist-lib/esm-chunks/{chunk-5T4XBUJP.mjs → chunk-4HEUXQGM.mjs} +4 -4
  29. package/dist-lib/esm-chunks/{chunk-7HANEMO4.mjs → chunk-4ZRMJ5YO.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-4ZFNH7TU.mjs → chunk-6A6JEVIF.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-KVTIDLBK.mjs → chunk-ABMB3G7I.mjs} +3 -3
  32. package/dist-lib/esm-chunks/{chunk-C3WBGYP6.mjs → chunk-BAYRN7ZL.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-KSQ5KM5Y.mjs → chunk-DJMWTW2B.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-DADGQELM.mjs → chunk-IRMC5BCX.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-YB27R6JG.mjs → chunk-NPLEBOWJ.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-HSADZOVN.mjs → chunk-O4EOBXAP.mjs} +1 -1
  37. package/dist-lib/esm-chunks/{chunk-JCKI3VZ6.mjs → chunk-ORYS5CC4.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-2NPABFPN.mjs → chunk-PMGJ7FLI.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-6VY6HTJC.mjs → chunk-QUBR7LHU.mjs} +2036 -1918
  40. package/dist-lib/esm-chunks/{chunk-IWJUYJQO.mjs → chunk-QYYJESMK.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-CVGDRROP.mjs → chunk-VAQJQDWI.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-DEGYKHN7.mjs → chunk-VCAJFWZD.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-2EUHEBIJ.mjs → chunk-XO5GX4PI.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-MIQSRBVU.mjs → chunk-ZCMAKWHN.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{metro-layout-parser-MVUAXRUJ.mjs → metro-layout-parser-AUAVE5VL.mjs} +3 -3
  46. package/dist-lib/expo-swift-bundle.cjs +5580 -5768
  47. package/dist-lib/expo-swift-metadata.cjs +1 -1
  48. package/dist-lib/expo-swift-metadata.mjs +7 -7
  49. package/dist-lib/home-paths.cjs +1 -1
  50. package/dist-lib/host/bridge-host.cjs +6332 -6500
  51. package/dist-lib/host/fetch-proxy-handler.cjs +13891 -13919
  52. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  53. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  54. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  55. package/dist-lib/host/websocket-proxy.cjs +1 -1
  56. package/dist-lib/index.cjs +1 -1
  57. package/dist-lib/jump-to-source-babel.cjs +1 -1
  58. package/dist-lib/jump-to-source-native.cjs +1 -1
  59. package/dist-lib/kotlin-host.cjs +1 -1
  60. package/dist-lib/menu.cjs +1 -1
  61. package/dist-lib/menu.mjs +3 -3
  62. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  63. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  64. package/dist-lib/metro-production-bundle.cjs +1 -1
  65. package/dist-lib/metro-production-bundle.mjs +4 -4
  66. package/dist-lib/native-app-identity-project.cjs +784 -536
  67. package/dist-lib/native-app-identity-project.mjs +543 -408
  68. package/dist-lib/native-app-identity.cjs +1 -1
  69. package/dist-lib/native-app-identity.mjs +6 -6
  70. package/dist-lib/native-firebase-metadata.cjs +1 -1
  71. package/dist-lib/native-firebase-metadata.mjs +3 -3
  72. package/dist-lib/pdfium-raster.cjs +1 -1
  73. package/dist-lib/pdfium-raster.mjs +2 -2
  74. package/dist-lib/plist.cjs +1 -1
  75. package/dist-lib/plist.mjs +3 -3
  76. package/dist-lib/profiles.cjs +1 -1
  77. package/dist-lib/public-brand.cjs +1 -1
  78. package/dist-lib/public-origins-lib-esm.json +81 -79
  79. package/dist-lib/public-origins-lib.json +185 -195
  80. package/dist-lib/react-native-host-modules.cjs +1 -1
  81. package/dist-lib/react-native-host-modules.mjs +2 -2
  82. package/dist-lib/reap-browser.cjs +1 -1
  83. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  84. package/dist-lib/sdk.cjs +1 -1
  85. package/dist-lib/sdk.mjs +7 -7
  86. package/dist-lib/skills.cjs +7579 -7758
  87. package/dist-lib/swift-compile.cjs +1978 -1922
  88. package/dist-lib/swift-compile.mjs +8 -8
  89. package/dist-lib/swift-package.cjs +1 -1
  90. package/dist-lib/swift-package.mjs +3 -3
  91. package/dist-lib/swift-submit.cjs +1 -1
  92. package/dist-lib/swift-submit.mjs +5 -5
  93. package/dist-lib/swift-toolchain.cjs +3 -1
  94. package/dist-lib/swift.cjs +1 -1
  95. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  96. package/dist-lib/vendor/acorn.cjs +1 -1
  97. package/dist-lib/vendor/bplist-parser.cjs +1 -1
  98. package/dist-lib/vendor/ignore.cjs +1 -1
  99. package/dist-lib/vendor/magic-string.cjs +1 -1
  100. package/dist-lib/vendor/plist.cjs +17 -17
  101. package/dist-lib/vendor/smol-toml.cjs +1 -1
  102. package/dist-lib/vendor/stream-json.cjs +1 -1
  103. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  104. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  105. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  106. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  107. package/dist-lib/vendor/sucrase.cjs +1 -1
  108. package/dist-lib/vendor/terser.cjs +1 -1
  109. package/dist-lib/vendor/valibot.cjs +1 -1
  110. package/dist-lib/vendor/zod.cjs +1 -1
  111. package/dist-lib/worklet-executable.cjs +1 -1
  112. package/dist-lib/worklet-executable.mjs +3 -3
  113. package/dist-types/packages/peach-compat/src/stubs/native-seams/react-native-cookies.d.ts +4 -0
  114. package/dist-types/packages/peach-engine/src/remote-stream/cloud-display.d.ts +2 -2
  115. package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +9 -0
  116. package/package.json +1 -1
  117. package/runtime-companion.json +1 -1
  118. package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/NSDateComponentsFormatter.h +1 -1
  119. package/src/expo-discovery-cache.ts +9 -45
  120. package/src/expo-native-compiler-digest.ts +8 -0
  121. package/src/expo-native-prebuilt.ts +1 -10
  122. package/src/expo-native-workspace.ts +5 -120
  123. package/src/expo-pod-prebuilt.ts +1 -1
  124. package/src/expo-swift-host.ts +48 -35
  125. package/src/host/bridge-host.ts +2 -0
  126. package/src/installed-native-libraries.ts +10 -20
  127. package/src/native-slices.ts +1 -1
  128. package/src/pod-graph-specifications.ts +11 -0
  129. package/src/pods-install.ts +10 -7
  130. package/src/podspec-cocoapods.ts +8 -3
  131. package/src/podspec-sources.ts +19 -15
  132. package/src/swift-clang-type-ownership.ts +118 -0
  133. package/src/swift-compile.ts +20 -12
  134. package/src/swift-guest-image-ledger.ts +48 -0
  135. package/src/swift-guest-link.ts +11 -1
  136. package/src/swift-host.ts +7 -8
  137. package/src/swift-package-manifest.ts +13 -8
  138. package/src/swift-packages.ts +0 -5
  139. package/src/swift-toolchain.ts +1 -1
  140. package/src/xcode-project.ts +64 -46
  141. package/src/portable-expo-contract.ts +0 -108
  142. package/src/portable-expo-workspace.ts +0 -100
  143. package/src/prepared-xcode-phases.ts +0 -194
@@ -1,17 +1,24 @@
1
- /*! peach v0.1.2439 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2441 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  LAUNCH_METADATA_KEYS,
4
4
  LAUNCH_METADATA_KEYS_PATH
5
- } from "./esm-chunks/chunk-HSADZOVN.mjs";
5
+ } from "./esm-chunks/chunk-O4EOBXAP.mjs";
6
6
  import {
7
7
  NATIVE_GRAPH_SDK_VERSION,
8
- cacheDir
9
- } from "./esm-chunks/chunk-6VY6HTJC.mjs";
8
+ cacheDir,
9
+ parseSwiftDistributionLock,
10
+ privateSwiftRelease,
11
+ readActiveRuntime,
12
+ registerSwiftHostCompiler,
13
+ runtimeDir,
14
+ swiftEnvironment,
15
+ swiftToolchainBin
16
+ } from "./esm-chunks/chunk-QUBR7LHU.mjs";
10
17
  import {
11
18
  isSwiftNativeTranslationUnit,
12
19
  moduleMapName
13
- } from "./esm-chunks/chunk-2EUHEBIJ.mjs";
14
- import "./esm-chunks/chunk-C3WBGYP6.mjs";
20
+ } from "./esm-chunks/chunk-XO5GX4PI.mjs";
21
+ import "./esm-chunks/chunk-BAYRN7ZL.mjs";
15
22
  import {
16
23
  androidMergedResourceValuesDirectory,
17
24
  extractNativeAppIdentityFromFiles,
@@ -28,22 +35,22 @@ import {
28
35
  xcodeBuildFileBuildsForIos,
29
36
  xcodePathResolver,
30
37
  xcodeTargetMemberVisitor
31
- } from "./esm-chunks/chunk-5T4XBUJP.mjs";
32
- import "./esm-chunks/chunk-DEGYKHN7.mjs";
38
+ } from "./esm-chunks/chunk-4HEUXQGM.mjs";
39
+ import "./esm-chunks/chunk-VCAJFWZD.mjs";
33
40
  import {
34
41
  parsePlistSource,
35
42
  require_plist
36
- } from "./esm-chunks/chunk-HIDNO3RP.mjs";
37
- import "./esm-chunks/chunk-4ZFNH7TU.mjs";
38
- import "./esm-chunks/chunk-CVGDRROP.mjs";
43
+ } from "./esm-chunks/chunk-4BZ3Z3IQ.mjs";
44
+ import "./esm-chunks/chunk-6A6JEVIF.mjs";
45
+ import "./esm-chunks/chunk-VAQJQDWI.mjs";
39
46
  import {
40
47
  isRecord
41
- } from "./esm-chunks/chunk-JCKI3VZ6.mjs";
48
+ } from "./esm-chunks/chunk-ORYS5CC4.mjs";
42
49
  import {
43
50
  __commonJS,
44
51
  __publicField,
45
52
  __toESM
46
- } from "./esm-chunks/chunk-IWJUYJQO.mjs";
53
+ } from "./esm-chunks/chunk-QYYJESMK.mjs";
47
54
 
48
55
  // ../../node_modules/json5/lib/unicode.js
49
56
  var require_unicode = __commonJS({
@@ -91,8 +98,8 @@ var require_parse = __commonJS({
91
98
  var token;
92
99
  var key;
93
100
  var root;
94
- module.exports = function parse(text2, reviver) {
95
- source = String(text2);
101
+ module.exports = function parse(text3, reviver) {
102
+ source = String(text3);
96
103
  parseState = "start";
97
104
  stack = [];
98
105
  pos = 0;
@@ -1160,14 +1167,14 @@ var require_lib = __commonJS({
1160
1167
  // src/native-app-identity-project.ts
1161
1168
  import fs8 from "node:fs";
1162
1169
  import { createRequire } from "node:module";
1163
- import path10 from "node:path";
1170
+ import path9 from "node:path";
1164
1171
 
1165
1172
  // src/xcode-project.ts
1166
1173
  var import_plist2 = __toESM(require_plist(), 1);
1167
1174
  import { execFileSync as execFileSync3 } from "node:child_process";
1168
- import { createHash as createHash8 } from "node:crypto";
1175
+ import { createHash as createHash7 } from "node:crypto";
1169
1176
  import fs7 from "node:fs";
1170
- import path9 from "node:path";
1177
+ import path8 from "node:path";
1171
1178
 
1172
1179
  // src/bazel-project.ts
1173
1180
  var import_plist = __toESM(require_plist(), 1);
@@ -1309,7 +1316,7 @@ function bazelGraph(root, label, configuration) {
1309
1316
  const infoplists = app2.attrs.get("infoplists")?.list ?? [];
1310
1317
  const roots = [...deps, ...strings];
1311
1318
  const query = `kind("${QUERIED_RULES.join("|")}", deps(set(${roots.join(" ")})))${infoplists.length > 0 ? ` + set(${infoplists.join(" ")})` : ""}`;
1312
- const output2 = run(["cquery", query, ...flags, "--output=jsonproto"]);
1319
+ const output = run(["cquery", query, ...flags, "--output=jsonproto"]);
1313
1320
  const defaults = run([
1314
1321
  "cquery",
1315
1322
  query,
@@ -1325,7 +1332,7 @@ function bazelGraph(root, label, configuration) {
1325
1332
  `${file}.partial`,
1326
1333
  JSON.stringify({
1327
1334
  application,
1328
- cquery: output2,
1335
+ cquery: output,
1329
1336
  defaults,
1330
1337
  info: info2,
1331
1338
  bin: bin.slice(0, bin.indexOf("/bin/") + 4)
@@ -1399,7 +1406,7 @@ var BazelFiles = class {
1399
1406
  this.root = root;
1400
1407
  __publicField(this, "generated", /* @__PURE__ */ new Set());
1401
1408
  for (const rule of graph.rules.values())
1402
- for (const output2 of rule.outputs) this.generated.add(output2);
1409
+ for (const output of rule.outputs) this.generated.add(output);
1403
1410
  }
1404
1411
  repoDir(repo) {
1405
1412
  if (repo === "") return this.root;
@@ -1440,7 +1447,7 @@ var BazelFiles = class {
1440
1447
  if (actual) visit(actual, label, seen);
1441
1448
  } else if (rule.ruleClass === "filegroup")
1442
1449
  for (const item of rule.attrs.get("srcs")?.list ?? []) visit(item, label, seen);
1443
- else for (const output2 of rule.outputs) files.push(this.path(output2));
1450
+ else for (const output of rule.outputs) files.push(this.path(output));
1444
1451
  };
1445
1452
  for (const label of labels) visit(label, from, /* @__PURE__ */ new Set());
1446
1453
  return [...new Set(files)];
@@ -1626,7 +1633,7 @@ function readBazelAppTarget(buildFile, targetName, configurationName, options =
1626
1633
  const textual = new Set(
1627
1634
  files.expand(rule.attrs.get("textual_hdrs")?.list ?? [], rule.label)
1628
1635
  );
1629
- const text2 = `module ${moduleName} {
1636
+ const text3 = `module ${moduleName} {
1630
1637
  ${published.map(
1631
1638
  (file) => ` ${textual.has(file) ? "textual header" : "header"} "${path.relative(path.dirname(moduleMap), file)}"
1632
1639
  `
@@ -1634,8 +1641,8 @@ ${published.map(
1634
1641
  }
1635
1642
  `;
1636
1643
  fs.mkdirSync(path.dirname(moduleMap), { recursive: true });
1637
- if (!fs.existsSync(moduleMap) || fs.readFileSync(moduleMap, "utf8") !== text2)
1638
- fs.writeFileSync(moduleMap, text2);
1644
+ if (!fs.existsSync(moduleMap) || fs.readFileSync(moduleMap, "utf8") !== text3)
1645
+ fs.writeFileSync(moduleMap, text3);
1639
1646
  const clangDefines = [...debug ? ["DEBUG=1"] : [], ...defines].map(
1640
1647
  (define) => `-D${define}`
1641
1648
  );
@@ -1753,8 +1760,8 @@ ${published.map(
1753
1760
  ].filter((file) => !fs.existsSync(file));
1754
1761
  const mirror = () => {
1755
1762
  for (const rule of graph.rules.values())
1756
- for (const output2 of rule.outputs) {
1757
- const target = files.path(output2);
1763
+ for (const output of rule.outputs) {
1764
+ const target = files.path(output);
1758
1765
  if (target.endsWith(".a")) continue;
1759
1766
  const source = path.join(graph.outputs, path.relative(graph.bin, target));
1760
1767
  if (!fs.existsSync(source)) continue;
@@ -1774,7 +1781,7 @@ ${published.map(
1774
1781
  if (options.prepareGeneratedSources && absent().length > 0) {
1775
1782
  const owners = /* @__PURE__ */ new Map();
1776
1783
  for (const rule of graph.rules.values())
1777
- for (const output2 of rule.outputs) owners.set(files.path(output2), rule.label);
1784
+ for (const output of rule.outputs) owners.set(files.path(output), rule.label);
1778
1785
  const generators = [
1779
1786
  ...new Set(absent().flatMap((file) => owners.get(file) ?? []))
1780
1787
  ].sort();
@@ -1809,7 +1816,7 @@ ${published.map(
1809
1816
  const label2 = canonicalLabel(raw, rule.label);
1810
1817
  for (const archive of files.expand([raw], rule.label).filter((file) => file.endsWith(".a"))) {
1811
1818
  const owner = [...graph.rules.values()].find(
1812
- (item) => item.outputs.some((output2) => files.path(output2) === archive)
1819
+ (item) => item.outputs.some((output) => files.path(output) === archive)
1813
1820
  );
1814
1821
  const key = owner?.label ?? label2;
1815
1822
  const entry = archives.get(key) ?? {
@@ -2361,80 +2368,21 @@ var ios_sdk_frameworks_default = {
2361
2368
  ]
2362
2369
  };
2363
2370
 
2364
- // src/prepared-xcode-phases.ts
2365
- import { createHash as createHash2 } from "node:crypto";
2371
+ // src/pod-graph-specifications.ts
2366
2372
  import fs2 from "node:fs";
2367
- import path2 from "node:path";
2368
- var workspaces = /* @__PURE__ */ new Map();
2369
- var recording;
2370
- function relativeFile(root, file) {
2371
- const relative2 = path2.relative(root, file);
2372
- if (!relative2 || relative2 === ".." || relative2.startsWith(`..${path2.sep}`) || path2.isAbsolute(relative2))
2373
- throw new Error(`prepared Xcode output is outside its workspace: ${file}`);
2374
- return relative2.split(path2.sep).join("/");
2375
- }
2376
- function output(root, file) {
2377
- const relative2 = relativeFile(root, file);
2378
- const stat = fs2.statSync(file, { throwIfNoEntry: false });
2379
- if (!stat) return { path: relative2, sha256: null };
2380
- if (!stat.isFile()) throw new Error(`prepared Xcode output is not a file: ${file}`);
2381
- relativeFile(root, fs2.realpathSync(file));
2382
- const bytes = fs2.readFileSync(file);
2383
- const prefix = Buffer.from(root);
2384
- const hash = createHash2("sha256");
2385
- let offset = 0;
2386
- for (let index = bytes.indexOf(prefix); index !== -1; index = bytes.indexOf(prefix, offset)) {
2387
- hash.update(bytes.subarray(offset, index)).update("\0workspace\0");
2388
- offset = index + prefix.length;
2389
- }
2390
- hash.update(bytes.subarray(offset));
2391
- return {
2392
- path: relative2,
2393
- sha256: hash.digest("hex")
2394
- };
2395
- }
2396
- function preparedXcodePhase(project, target, phase, configuration, outputs, recorded) {
2397
- const root = recording?.root ?? [...workspaces.keys()].find((root2) => {
2398
- const relative2 = path2.relative(root2, project);
2399
- return relative2 !== ".." && !relative2.startsWith(`..${path2.sep}`) && !path2.isAbsolute(relative2);
2400
- });
2401
- if (!root) return false;
2402
- const entry = {
2403
- project: relativeFile(root, project),
2404
- target,
2405
- phase,
2406
- configuration,
2407
- outputs: outputs.map((file) => output(root, file))
2408
- };
2409
- if (recorded) {
2410
- if (recording) {
2411
- const previous = recording.phases.find(
2412
- (item) => item.project === entry.project && item.target === target && item.phase === phase && item.configuration === configuration
2413
- );
2414
- if (previous && JSON.stringify(previous.outputs) !== JSON.stringify(entry.outputs))
2415
- throw new Error(
2416
- `Xcode phase produced inconsistent outputs: ${project} ${target} ${phase}`
2417
- );
2418
- if (!previous) recording.phases.push(entry);
2419
- }
2420
- return false;
2421
- }
2422
- if (recording) return false;
2423
- const expected = workspaces.get(root)?.phases.find(
2424
- (item) => item.project === entry.project && item.target === target && item.phase === phase && item.configuration === configuration
2425
- );
2426
- if (!expected || JSON.stringify(expected.outputs) !== JSON.stringify(entry.outputs))
2427
- throw new Error(
2428
- `prepared Xcode phase does not match its attested outputs: ${project} ${target} ${phase}`
2429
- );
2430
- return true;
2373
+ var POD_GRAPH_SPECIFICATIONS = ".peach-podspecs.json";
2374
+ function readPodGraphSpecifications(file) {
2375
+ const value = JSON.parse(fs2.readFileSync(file, "utf8"));
2376
+ if (!isRecord(value) || !Object.values(value).every((item) => typeof item === "string"))
2377
+ throw new Error(`${file}: invalid pod graph specifications`);
2378
+ return new Map(Object.entries(value).map(([name, json]) => [name, String(json)]));
2431
2379
  }
2432
2380
 
2433
2381
  // src/swift-binary-modules.ts
2434
- import { createHash as createHash3 } from "node:crypto";
2382
+ import { createHash as createHash2 } from "node:crypto";
2435
2383
  import fs3 from "node:fs";
2436
- import path3 from "node:path";
2437
- var cacheDir2 = path3.join(cacheDir(), "swift-binary-modules");
2384
+ import path2 from "node:path";
2385
+ var cacheDir2 = path2.join(cacheDir(), "swift-binary-modules");
2438
2386
  function frameworkModules(paths) {
2439
2387
  const modules = /* @__PURE__ */ new Set();
2440
2388
  for (const file of paths) {
@@ -2448,17 +2396,17 @@ function localSwiftBinaryModules(dir) {
2448
2396
  const slices = fs3.readdirSync(dir, { withFileTypes: true }).filter((slice) => slice.isDirectory());
2449
2397
  const frameworks = frameworkModules(
2450
2398
  slices.flatMap(
2451
- (slice) => fs3.readdirSync(path3.join(dir, slice.name)).map((entry) => `${slice.name}/${entry}`)
2399
+ (slice) => fs3.readdirSync(path2.join(dir, slice.name)).map((entry) => `${slice.name}/${entry}`)
2452
2400
  )
2453
2401
  );
2454
2402
  if (frameworks.length > 0) return frameworks;
2455
2403
  const modules = /* @__PURE__ */ new Set();
2456
2404
  for (const slice of slices) {
2457
- const headers = path3.join(dir, slice.name, "Headers");
2405
+ const headers = path2.join(dir, slice.name, "Headers");
2458
2406
  if (!fs3.existsSync(headers)) continue;
2459
2407
  for (const file of fs3.readdirSync(headers, { recursive: true, encoding: "utf8" })) {
2460
- if (path3.basename(file) !== "module.modulemap") continue;
2461
- const module = moduleMapName(fs3.readFileSync(path3.join(headers, file), "utf8"));
2408
+ if (path2.basename(file) !== "module.modulemap") continue;
2409
+ const module = moduleMapName(fs3.readFileSync(path2.join(headers, file), "utf8"));
2462
2410
  if (module) modules.add(module);
2463
2411
  }
2464
2412
  }
@@ -2466,15 +2414,15 @@ function localSwiftBinaryModules(dir) {
2466
2414
  }
2467
2415
 
2468
2416
  // src/swift-coverage/xcode-assets.ts
2469
- import { createHash as createHash5 } from "node:crypto";
2417
+ import { createHash as createHash4 } from "node:crypto";
2470
2418
  import { readFileSync as readFileSync3, readdirSync as readdirSync2, statSync, writeFileSync } from "node:fs";
2471
2419
  import { join as join3, relative, sep } from "node:path";
2472
2420
 
2473
2421
  // src/swift-coverage/provenance.ts
2474
- import { createHash as createHash4 } from "node:crypto";
2422
+ import { createHash as createHash3 } from "node:crypto";
2475
2423
  import { readFileSync } from "node:fs";
2476
2424
  import { join } from "node:path";
2477
- var 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":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","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":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a19fe4c5e2efe18bbc3ece544ff2c8be660170d63274cccb0ab58e53083050e4","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"a0ef7c20a2bc2b7dbd98b9006a8b000b9b4f9708f1bcf0adad8aaf79ef253022","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"1eea444b8005e33de0a9987f184b183ba3fd49ab8af347a893383ec2e464cf4d","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests(join(import.meta.dirname, ".."));
2425
+ var 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":"65a500b806ce1c3a496de27f2e0ad77287c0f6795c618342c08af647f92af1fa","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":"f2dd4c7cd8ef77035184b0132909c2fa09fd20ed06b7757c2f1f960bfdde031c","swift-coverage/reader.ts":"da559b67ecd1161dea70c980b5f98f2c55af3550f0714479100fa5e9e813625c","swift-coverage/provenance.ts":"f5039c16e63c6129e22b71203f58982c68cef6e282a4f236b93da28edd39c108","swift-package-manifest.ts":"a29021d65b39fb2fd2301b1e235d5913662e65f23f4565a7f391f73661951725","swift-package.ts":"851417572ca9aff699ad368bdc3ff05309b0256e483d40812b9c0beb869d0a5b","swift-source-file.ts":"8becce5e73b76a61d9d202c1ecfb39b1238e9bbf0e77841f1c51c98fa9ac7bd3","swift-toolchain.ts":"407dafd67b3369981c1d91f67c8ea26580b478e15528d1a2c255af7bf6bfd40d","home-paths.ts":"d1606390f0e8e50f0ff72544eadb3d49dfabf08e004c1218f2998c36fb8995dd","xcode-header-search.ts":"4a775ba92c7b23ce71dd6bb08c188c4bccd6e1ed500cc9fc7850030b945fc8d4","xcode-project.ts":"2806d7a7a347e63313177f63a8c450c0a1926a3a30bc44864872f423a28806d8","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests(join(import.meta.dirname, ".."));
2478
2426
 
2479
2427
  // src/swift-coverage/xcode-asset-symbols.ts
2480
2428
  import { existsSync, readdirSync, readFileSync as readFileSync2 } from "node:fs";
@@ -2659,15 +2607,217 @@ var assetSymbolSettingKeys = [
2659
2607
  "ASSETCATALOG_OTHER_FLAGS"
2660
2608
  ];
2661
2609
 
2610
+ // src/answeredNativePackages.ts
2611
+ import { AsyncLocalStorage } from "node:async_hooks";
2612
+ import { readFileSync as readFileSync4 } from "node:fs";
2613
+ import { join as join4 } from "node:path";
2614
+
2615
+ // src/runtime-assets.ts
2616
+ import fs4 from "fs";
2617
+ import path3 from "path";
2618
+ import { fileURLToPath } from "url";
2619
+ var _monorepoRootCache;
2620
+ function findMonorepoRoot() {
2621
+ if (_monorepoRootCache !== void 0) return _monorepoRootCache;
2622
+ let dir = path3.dirname(fileURLToPath(import.meta.url));
2623
+ for (let i = 0; i < 12 && dir !== path3.dirname(dir); i++) {
2624
+ if (fs4.existsSync(path3.join(dir, "packages/peach-engine/package.json")) && fs4.existsSync(path3.join(dir, "public/sootsim"))) {
2625
+ _monorepoRootCache = dir;
2626
+ return dir;
2627
+ }
2628
+ dir = path3.dirname(dir);
2629
+ }
2630
+ _monorepoRootCache = null;
2631
+ return null;
2632
+ }
2633
+ function resolveDevCheckoutRuntimeAssetRoot() {
2634
+ if (process.env.PEACH_HOME && readActiveRuntime()) return null;
2635
+ const root = findMonorepoRoot();
2636
+ if (!root) return null;
2637
+ return path3.join(root, "public/sootsim");
2638
+ }
2639
+ function resolveDevCheckoutRuntimeRoot() {
2640
+ const devBuild = resolveDevCheckoutRuntimeAssetRoot();
2641
+ if (!devBuild) return null;
2642
+ if (fs4.existsSync(path3.join(devBuild, "index.html")) && fs4.existsSync(path3.join(devBuild, "engine/index.html")) && fs4.existsSync(path3.join(devBuild, "engine-tenant/worker.js")) && fs4.existsSync(path3.join(devBuild, "engine-tenant/worker.prod.js"))) {
2643
+ return devBuild;
2644
+ }
2645
+ return null;
2646
+ }
2647
+ function resolveActiveRuntimeRoot() {
2648
+ const devRoot = resolveDevCheckoutRuntimeRoot();
2649
+ if (devRoot) return devRoot;
2650
+ const active = readActiveRuntime();
2651
+ if (!active) return null;
2652
+ const dir = runtimeDir(active);
2653
+ if (!fs4.existsSync(path3.join(dir, "index.html"))) return null;
2654
+ return dir;
2655
+ }
2656
+
2657
+ // src/answeredNativePackages.ts
2658
+ var runtimeLaunchMetadataKeysFile = {
2659
+ path: LAUNCH_METADATA_KEYS_PATH,
2660
+ contents: `${JSON.stringify(LAUNCH_METADATA_KEYS)}
2661
+ `
2662
+ };
2663
+ var unansweredStore = new AsyncLocalStorage();
2664
+ var answeredStore = new AsyncLocalStorage();
2665
+ function peachRuntimeRoot() {
2666
+ const root = resolveDevCheckoutRuntimeAssetRoot() ?? resolveActiveRuntimeRoot();
2667
+ if (!root) throw new Error("No Peach runtime installed; run `peach runtime install`");
2668
+ return root;
2669
+ }
2670
+ function readPeachRuntimeJson(relative2) {
2671
+ try {
2672
+ return JSON.parse(readFileSync4(join4(peachRuntimeRoot(), relative2), "utf8"));
2673
+ } catch (error) {
2674
+ if (error instanceof Error && "code" in error && error.code === "ENOENT")
2675
+ throw new Error(
2676
+ `The active Peach runtime predates ${relative2}; run \`peach runtime install\``
2677
+ );
2678
+ throw error;
2679
+ }
2680
+ }
2681
+
2682
+ // src/nitroAdapterContract.ts
2683
+ import { createHash as createHash5 } from "node:crypto";
2684
+ import { readdirSync as readdirSync3, readFileSync as readFileSync5 } from "node:fs";
2685
+ import path4 from "node:path";
2686
+ var ADAPTER_FAMILIES = {
2687
+ nitro: {
2688
+ label: "Nitro adapter",
2689
+ archive: "libPeachNitroAdapter.a",
2690
+ key: "nitro-adapter",
2691
+ headers: ["reactNativeJsi", "nitroModules"]
2692
+ },
2693
+ turbo: {
2694
+ label: "TurboModule runtime",
2695
+ archive: "libPeachTurboRuntime.a",
2696
+ key: "turbo-runtime",
2697
+ headers: ["reactNativeJsi"]
2698
+ }
2699
+ };
2700
+ var hex64 = (value) => typeof value === "string" && /^[a-f0-9]{64}$/.test(value);
2701
+ function text(family, value, what) {
2702
+ if (typeof value !== "string" || !value)
2703
+ throw new Error(`invalid ${ADAPTER_FAMILIES[family].label} ${what}`);
2704
+ return value;
2705
+ }
2706
+ function digestField(family, value, what) {
2707
+ if (!hex64(value)) throw new Error(`invalid ${ADAPTER_FAMILIES[family].label} ${what}`);
2708
+ return value;
2709
+ }
2710
+ function headerSet(family, value) {
2711
+ const keys = ADAPTER_FAMILIES[family].headers;
2712
+ if (!isRecord(value) || Object.keys(value).length !== keys.length)
2713
+ throw new Error(`invalid ${ADAPTER_FAMILIES[family].label} headers`);
2714
+ return Object.fromEntries(
2715
+ keys.map((key) => [key, digestField(family, value[key], `${key} header digest`)])
2716
+ );
2717
+ }
2718
+ function identity(family, value) {
2719
+ const invalid = () => new Error(`invalid ${ADAPTER_FAMILIES[family].label} manifest`);
2720
+ if (!isRecord(value) || value.schema !== 1) throw invalid();
2721
+ const { adapter, sdk, framework } = value;
2722
+ if (!isRecord(adapter) || !isRecord(sdk) || !isRecord(framework)) throw invalid();
2723
+ return {
2724
+ schema: 1,
2725
+ platform: text(family, value.platform, "platform"),
2726
+ target: text(family, value.target, "target"),
2727
+ recipe: digestField(family, value.recipe, "recipe"),
2728
+ adapter: { sha256: digestField(family, adapter.sha256, "adapter digest") },
2729
+ headers: headerSet(family, value.headers),
2730
+ compiler: text(family, value.compiler, "compiler"),
2731
+ sdk: {
2732
+ id: text(family, sdk.id, "sdk id"),
2733
+ checksum: digestField(family, sdk.checksum, "sdk checksum")
2734
+ },
2735
+ framework: {
2736
+ distribution: text(family, framework.distribution, "distribution"),
2737
+ wireAbi: digestField(family, framework.wireAbi, "wire abi")
2738
+ }
2739
+ };
2740
+ }
2741
+ var sameHeaders = (a, b) => JSON.stringify(a) === JSON.stringify(b);
2742
+ function parseAdapterLock(family, value) {
2743
+ const label = ADAPTER_FAMILIES[family].label;
2744
+ if (!isRecord(value) || value.schema !== 2 || !Array.isArray(value.archives))
2745
+ throw new Error(`invalid ${label} lock`);
2746
+ const { headers: _headers, ...shared } = identity(family, {
2747
+ ...value,
2748
+ schema: 1,
2749
+ headers: Object.fromEntries(
2750
+ ADAPTER_FAMILIES[family].headers.map((key) => [key, "0".repeat(64)])
2751
+ )
2752
+ });
2753
+ const archives = value.archives.map((entry) => {
2754
+ if (!isRecord(entry) || typeof entry.size !== "number")
2755
+ throw new Error(`invalid ${label} lock archive`);
2756
+ return {
2757
+ headers: headerSet(family, entry.headers),
2758
+ sha256: digestField(family, entry.sha256, "lock archive digest"),
2759
+ size: entry.size
2760
+ };
2761
+ });
2762
+ archives.forEach((entry, index) => {
2763
+ if (archives.findIndex((other) => sameHeaders(other.headers, entry.headers)) !== index)
2764
+ throw new Error(`${label} lock repeats a header set`);
2765
+ });
2766
+ return { ...shared, schema: 2, archives };
2767
+ }
2768
+
2769
+ // src/swiftNativePinContract.ts
2770
+ var SWIFT_NATIVE_PIN_PATH = "node/swift-native.json";
2771
+ var SWIFT_NATIVE_PIN_SCHEMA = 3;
2772
+ var DIGEST = /^[a-f0-9]{64}$/;
2773
+ function parseSwiftNativePin(value) {
2774
+ if (!isRecord(value)) throw new Error("invalid Swift native pin");
2775
+ if (value.schema !== SWIFT_NATIVE_PIN_SCHEMA)
2776
+ throw new Error(
2777
+ typeof value.schema === "number" && value.schema > SWIFT_NATIVE_PIN_SCHEMA ? "the active Peach runtime pins Swift for a newer peach CLI; update peach" : "the active Peach runtime pins Swift for an older peach CLI; run `peach runtime install`"
2778
+ );
2779
+ const { compiler, adapters } = value;
2780
+ if (!isRecord(compiler) || typeof compiler.identity !== "string" || compiler.archive !== "tar.gz" && compiler.archive !== "tar.zst" || !isRecord(compiler.hosts) || !isRecord(adapters))
2781
+ throw new Error("invalid Swift native pin");
2782
+ const hosts = {};
2783
+ for (const [host, archive] of Object.entries(compiler.hosts)) {
2784
+ if (!isRecord(archive) || typeof archive.checksum !== "string" || !DIGEST.test(archive.checksum) || typeof archive.manifest !== "string" || !DIGEST.test(archive.manifest))
2785
+ throw new Error(`invalid Swift native pin compiler entry for ${host}`);
2786
+ hosts[host] = { checksum: archive.checksum, manifest: archive.manifest };
2787
+ }
2788
+ return {
2789
+ schema: SWIFT_NATIVE_PIN_SCHEMA,
2790
+ distribution: parseSwiftDistributionLock(value.distribution),
2791
+ compiler: { identity: compiler.identity, archive: compiler.archive, hosts },
2792
+ adapters: {
2793
+ nitro: parseAdapterLock("nitro", adapters.nitro),
2794
+ turbo: parseAdapterLock("turbo", adapters.turbo)
2795
+ }
2796
+ };
2797
+ }
2798
+
2799
+ // src/swift-native-pin.ts
2800
+ var pin;
2801
+ function swiftNativePin() {
2802
+ if (pin) return pin;
2803
+ if (true) {
2804
+ pin = parseSwiftNativePin(readPeachRuntimeJson(SWIFT_NATIVE_PIN_PATH));
2805
+ registerSwiftHostCompiler(pin.distribution.release, pin.compiler);
2806
+ } else {
2807
+ pin = repoSwiftNativePin();
2808
+ }
2809
+ return pin;
2810
+ }
2811
+
2662
2812
  // src/swift-package-manifest.ts
2663
2813
  import {
2664
2814
  execFile,
2665
2815
  execFileSync as execFileSync2
2666
2816
  } from "node:child_process";
2667
- import { createHash as createHash7 } from "node:crypto";
2817
+ import { createHash as createHash6 } from "node:crypto";
2668
2818
  import fs6 from "node:fs";
2669
2819
  import os3 from "node:os";
2670
- import path7 from "node:path";
2820
+ import path6 from "node:path";
2671
2821
  import { promisify } from "node:util";
2672
2822
 
2673
2823
  // src/git-repo-env.ts
@@ -2679,68 +2829,44 @@ var UNATTENDED_GIT_ENV = {
2679
2829
  // src/swift-distribution.ts
2680
2830
  import fs5 from "node:fs";
2681
2831
  import os2 from "node:os";
2682
- import path6 from "node:path";
2832
+ import path5 from "node:path";
2683
2833
 
2684
2834
  // cli/drivers/linux-browser-libs.ts
2685
2835
  import { spawnSync } from "node:child_process";
2686
2836
  import { existsSync as existsSync2 } from "node:fs";
2687
- import { join as join4 } from "node:path";
2688
-
2689
- // src/answeredNativePackages.ts
2690
- import { AsyncLocalStorage } from "node:async_hooks";
2691
- import { readFileSync as readFileSync4 } from "node:fs";
2692
2837
  import { join as join5 } from "node:path";
2693
2838
 
2694
- // src/runtime-assets.ts
2695
- import fs4 from "fs";
2696
- import path4 from "path";
2697
- import { fileURLToPath } from "url";
2698
-
2699
- // src/answeredNativePackages.ts
2700
- var runtimeLaunchMetadataKeysFile = {
2701
- path: LAUNCH_METADATA_KEYS_PATH,
2702
- contents: `${JSON.stringify(LAUNCH_METADATA_KEYS)}
2703
- `
2704
- };
2705
- var unansweredStore = new AsyncLocalStorage();
2706
- var answeredStore = new AsyncLocalStorage();
2707
-
2708
- // src/nitroAdapterContract.ts
2709
- import { createHash as createHash6 } from "node:crypto";
2710
- import { readdirSync as readdirSync3, readFileSync as readFileSync5 } from "node:fs";
2711
- import path5 from "node:path";
2712
-
2713
2839
  // src/swift-package-manifest.ts
2714
- var cacheDir3 = path7.join(cacheDir(), "swift-manifests");
2840
+ var cacheDir3 = path6.join(cacheDir(), "swift-manifests");
2715
2841
  var execFileAsync = promisify(execFile);
2716
2842
 
2717
2843
  // src/xcode-json-project.ts
2718
2844
  var import_json5 = __toESM(require_lib(), 1);
2719
- import path8 from "node:path";
2845
+ import path7 from "node:path";
2720
2846
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
2721
- var text = (value) => typeof value === "string" ? value : void 0;
2847
+ var text2 = (value) => typeof value === "string" ? value : void 0;
2722
2848
  var items = (value) => Array.isArray(value) ? value : [];
2723
2849
  function remoteVersionRequirement(entry) {
2724
- const revision = text(entry.revision);
2850
+ const revision = text2(entry.revision);
2725
2851
  if (revision !== void 0) return { requirement: { kind: "revision", revision } };
2726
- const branch = text(entry.branch);
2852
+ const branch = text2(entry.branch);
2727
2853
  if (branch !== void 0) return { requirement: { kind: "branch", branch } };
2728
- const version = text(entry.version);
2854
+ const version = text2(entry.version);
2729
2855
  if (version !== void 0) return { requirement: { kind: "exactVersion", version } };
2730
- const minor = text(entry["up-to-next-minor-version"]);
2856
+ const minor = text2(entry["up-to-next-minor-version"]);
2731
2857
  if (minor !== void 0)
2732
2858
  return { requirement: { kind: "upToNextMinorVersion", minimumVersion: minor } };
2733
- const major = text(entry["up-to-next-major-version"]);
2859
+ const major = text2(entry["up-to-next-major-version"]);
2734
2860
  if (major !== void 0)
2735
2861
  return { requirement: { kind: "upToNextMajorVersion", minimumVersion: major } };
2736
- const range = text(entry["version-range"]);
2862
+ const range = text2(entry["version-range"]);
2737
2863
  if (range !== void 0) {
2738
2864
  const bounds = range.split("..<");
2739
2865
  const minimum2 = bounds[0];
2740
2866
  const maximum2 = bounds[1];
2741
2867
  if (bounds.length !== 2 || !minimum2 || !maximum2 || bounds[2] !== void 0)
2742
2868
  throw new Error(
2743
- `${text(entry.repository) ?? "package"} has a version-range that is not min..<max`
2869
+ `${text2(entry.repository) ?? "package"} has a version-range that is not min..<max`
2744
2870
  );
2745
2871
  return {
2746
2872
  requirement: {
@@ -2750,8 +2876,8 @@ function remoteVersionRequirement(entry) {
2750
2876
  }
2751
2877
  };
2752
2878
  }
2753
- const minimum = text(entry["version-range-min"]);
2754
- const maximum = text(entry["version-range-max"]);
2879
+ const minimum = text2(entry["version-range-min"]);
2880
+ const maximum = text2(entry["version-range-max"]);
2755
2881
  if (minimum !== void 0 && maximum !== void 0)
2756
2882
  return {
2757
2883
  requirement: {
@@ -2773,7 +2899,7 @@ var PHASE_ISA = {
2773
2899
  function readXcodeJsonProject(xcodeproj, source) {
2774
2900
  const json = import_json5.default.parse(source);
2775
2901
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
2776
- const projectDir = path8.dirname(xcodeproj);
2902
+ const projectDir = path7.dirname(xcodeproj);
2777
2903
  const objects = {};
2778
2904
  let next = 0;
2779
2905
  const add = (entry, id) => {
@@ -2786,7 +2912,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2786
2912
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
2787
2913
  if (base) {
2788
2914
  if (base[1] === "PROJECT")
2789
- return { sourceTree: "<absolute>", path: path8.join(projectDir, base[2]) };
2915
+ return { sourceTree: "<absolute>", path: path7.join(projectDir, base[2]) };
2790
2916
  if (base[1] === "PRODUCTS")
2791
2917
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
2792
2918
  return null;
@@ -2794,7 +2920,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2794
2920
  const unescaped = raw.replaceAll("\\<", "<");
2795
2921
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
2796
2922
  if (unescaped.startsWith("~")) return null;
2797
- return groupDir === null ? null : { sourceTree: "<absolute>", path: path8.join(groupDir, unescaped) };
2923
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: path7.join(groupDir, unescaped) };
2798
2924
  };
2799
2925
  const memberships = [];
2800
2926
  const folders = [];
@@ -2802,10 +2928,10 @@ function readXcodeJsonProject(xcodeproj, source) {
2802
2928
  const root = { id: "", name: "", dir: projectDir, parent: null, children: [] };
2803
2929
  const walk = (entries, parent) => entries.flatMap((entry) => {
2804
2930
  if (!isObject(entry)) return [];
2805
- const kind = text(entry.kind) ?? "file-reference";
2806
- const raw = text(entry.path) ?? "";
2931
+ const kind = text2(entry.kind) ?? "file-reference";
2932
+ const raw = text2(entry.path) ?? "";
2807
2933
  const located = raw === "" ? null : locate(raw, parent.dir);
2808
- const name = text(entry.name) ?? path8.basename(raw);
2934
+ const name = text2(entry.name) ?? path7.basename(raw);
2809
2935
  const node = { id: "", name, dir: null, parent, children: [] };
2810
2936
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
2811
2937
  node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -2821,7 +2947,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2821
2947
  ...kind === "variant-group" ? {} : { sourceTree: "<absolute>", path: node.dir ?? "" },
2822
2948
  name
2823
2949
  },
2824
- text(entry.id)
2950
+ text2(entry.id)
2825
2951
  );
2826
2952
  } else if (kind === "folder") {
2827
2953
  node.id = add(
@@ -2829,7 +2955,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2829
2955
  isa: "PBXFileSystemSynchronizedRootGroup",
2830
2956
  ...located ?? { sourceTree: "SDKROOT", path: raw }
2831
2957
  },
2832
- text(entry.id)
2958
+ text2(entry.id)
2833
2959
  );
2834
2960
  folders.push({ id: node.id, folder: entry });
2835
2961
  } else {
@@ -2839,7 +2965,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2839
2965
  ...located ?? { sourceTree: "SDKROOT", path: raw },
2840
2966
  name
2841
2967
  },
2842
- text(entry.id)
2968
+ text2(entry.id)
2843
2969
  );
2844
2970
  if (located?.sourceTree === "<absolute>" && located.path.endsWith(".xcodeproj"))
2845
2971
  projectFiles.push(node.id);
@@ -2866,7 +2992,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2866
2992
  if (Array.isArray(reference)) {
2867
2993
  return lookupNode(
2868
2994
  reference.map(
2869
- (component) => isObject(component) ? text(component.name) ?? "" : text(component) ?? ""
2995
+ (component) => isObject(component) ? text2(component.name) ?? "" : text2(component) ?? ""
2870
2996
  ).join("/"),
2871
2997
  from
2872
2998
  )?.id;
@@ -2874,7 +3000,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2874
3000
  return lookupNode(reference, from)?.id;
2875
3001
  };
2876
3002
  const lookupNode = (reference, from) => {
2877
- const value = text(reference);
3003
+ const value = text2(reference);
2878
3004
  if (value === void 0) return void 0;
2879
3005
  if (value.startsWith("id:")) {
2880
3006
  const id = value.slice(3);
@@ -2889,7 +3015,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2889
3015
  return node;
2890
3016
  };
2891
3017
  const configurations = items(json.configurations).flatMap((entry) => {
2892
- const name = isObject(entry) ? text(entry.name) : text(entry);
3018
+ const name = isObject(entry) ? text2(entry.name) : text2(entry);
2893
3019
  return name ? [{ name, file: isObject(entry) ? entry.file : void 0 }] : [];
2894
3020
  });
2895
3021
  const settingsOf = (value) => Object.fromEntries(
@@ -2904,12 +3030,12 @@ function readXcodeJsonProject(xcodeproj, source) {
2904
3030
  );
2905
3031
  const configurationList = (settings, specialized) => add({
2906
3032
  isa: "XCConfigurationList",
2907
- defaultConfigurationName: text(json["default-configuration"]) ?? "Debug",
3033
+ defaultConfigurationName: text2(json["default-configuration"]) ?? "Debug",
2908
3034
  buildConfigurations: configurations.map(({ name, file }) => {
2909
3035
  const reference = specialized.has(name) ? specialized.get(name) : file;
2910
3036
  const base = lookup(reference);
2911
3037
  const anchor = isObject(reference) ? lookupNode(reference.anchor, root)?.id : null;
2912
- const relative2 = isObject(reference) ? text(reference["relative-path"]) : null;
3038
+ const relative2 = isObject(reference) ? text2(reference["relative-path"]) : null;
2913
3039
  return add({
2914
3040
  isa: "XCBuildConfiguration",
2915
3041
  name,
@@ -2924,10 +3050,10 @@ function readXcodeJsonProject(xcodeproj, source) {
2924
3050
  const packageIds = /* @__PURE__ */ new Map();
2925
3051
  for (const entry of items(json.packages)) {
2926
3052
  if (!isObject(entry)) continue;
2927
- const repository = text(entry.repository);
2928
- const local = text(entry.path);
2929
- const name = local !== void 0 ? path8.basename(path8.resolve(path8.dirname(xcodeproj), local)) : path8.basename(repository ?? "").replace(/\.git$/, "");
2930
- const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
3053
+ const repository = text2(entry.repository);
3054
+ const local = text2(entry.path);
3055
+ const name = local !== void 0 ? path7.basename(path7.resolve(path7.dirname(xcodeproj), local)) : path7.basename(repository ?? "").replace(/\.git$/, "");
3056
+ const id = text2(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
2931
3057
  isa: "XCRemoteSwiftPackageReference",
2932
3058
  repositoryURL: repository ?? "",
2933
3059
  ...remoteVersionRequirement(entry)
@@ -2936,29 +3062,29 @@ function readXcodeJsonProject(xcodeproj, source) {
2936
3062
  }
2937
3063
  const productDependency = (entry) => add({
2938
3064
  isa: "XCSwiftPackageProductDependency",
2939
- productName: text(entry["product-name"]) ?? "",
3065
+ productName: text2(entry["product-name"]) ?? "",
2940
3066
  // xcode finds a product by name across packages when none is named
2941
- ...packageIds.has(text(entry.package)?.toLowerCase() ?? "") ? { package: packageIds.get(text(entry.package).toLowerCase()) } : {}
3067
+ ...packageIds.has(text2(entry.package)?.toLowerCase() ?? "") ? { package: packageIds.get(text2(entry.package).toLowerCase()) } : {}
2942
3068
  });
2943
3069
  const proxy = (entry, remote, proxyType) => add({
2944
3070
  isa: "PBXContainerItemProxy",
2945
3071
  containerPortal: lookup(entry.project) ?? "",
2946
3072
  proxyType,
2947
3073
  remoteGlobalIDString: remote ?? "",
2948
- remoteInfo: text(entry.target) ?? ""
3074
+ remoteInfo: text2(entry.target) ?? ""
2949
3075
  });
2950
3076
  const phases = /* @__PURE__ */ new Map();
2951
3077
  const targetIds = /* @__PURE__ */ new Map();
2952
3078
  const targets = [];
2953
3079
  for (const entry of items(json.targets)) {
2954
3080
  if (!isObject(entry)) continue;
2955
- const name = text(entry.name) ?? "";
2956
- const productType = text(entry["product-type"]);
3081
+ const name = text2(entry.name) ?? "";
3082
+ const productType = text2(entry["product-type"]);
2957
3083
  const target = {
2958
- isa: text(entry.kind) === "aggregate" ? "PBXAggregateTarget" : "PBXNativeTarget",
3084
+ isa: text2(entry.kind) === "aggregate" ? "PBXAggregateTarget" : "PBXNativeTarget",
2959
3085
  name,
2960
3086
  productName: name,
2961
- productType: productType ? `com.apple.product-type.${productType}` : text(entry["full-product-type"]) ?? "",
3087
+ productType: productType ? `com.apple.product-type.${productType}` : text2(entry["full-product-type"]) ?? "",
2962
3088
  buildPhases: [],
2963
3089
  dependencies: [],
2964
3090
  packageProductDependencies: [],
@@ -2966,17 +3092,17 @@ function readXcodeJsonProject(xcodeproj, source) {
2966
3092
  };
2967
3093
  const product = lookup(entry.product);
2968
3094
  if (product) target.productReference = product;
2969
- const id = add(target, text(entry.id));
3095
+ const id = add(target, text2(entry.id));
2970
3096
  targetIds.set(name, id);
2971
3097
  targets.push({ id, target, entry });
2972
3098
  for (const phase of items(entry["build-phases"])) {
2973
- const kind = isObject(phase) ? text(phase.kind) : text(phase);
3099
+ const kind = isObject(phase) ? text2(phase.kind) : text2(phase);
2974
3100
  const isa = kind ? PHASE_ISA[kind] : void 0;
2975
3101
  if (!kind || !isa) continue;
2976
- const phaseName = isObject(phase) ? text(phase.name) : void 0;
3102
+ const phaseName = isObject(phase) ? text2(phase.name) : void 0;
2977
3103
  const phaseId = add(
2978
3104
  { isa, files: [] },
2979
- isObject(phase) ? text(phase.id) : void 0
3105
+ isObject(phase) ? text2(phase.id) : void 0
2980
3106
  );
2981
3107
  target.buildPhases.push(phaseId);
2982
3108
  phases.set([name, kind, phaseName].filter(Boolean).join("/"), phaseId);
@@ -2984,7 +3110,7 @@ function readXcodeJsonProject(xcodeproj, source) {
2984
3110
  }
2985
3111
  }
2986
3112
  const phaseFiles = (reference, targetName) => {
2987
- const value = text(reference);
3113
+ const value = text2(reference);
2988
3114
  if (value === void 0) return null;
2989
3115
  const key = value.startsWith("id:") || !targetName ? value : `${targetName}/${value}`;
2990
3116
  const phase = objects[phases.get(key) ?? ""];
@@ -2995,17 +3121,17 @@ function readXcodeJsonProject(xcodeproj, source) {
2995
3121
  files?.push(add({ isa: "PBXBuildFile", fileRef: refId }));
2996
3122
  }
2997
3123
  for (const { target, entry } of targets) {
2998
- const name = text(entry.name) ?? "";
3124
+ const name = text2(entry.name) ?? "";
2999
3125
  target.buildConfigurationList = configurationList(
3000
3126
  settingsOf(entry["build-settings"]),
3001
3127
  new Map(
3002
3128
  items(entry["specialized-configurations"]).flatMap(
3003
- (configuration) => isObject(configuration) && text(configuration.name) ? [[text(configuration.name), configuration.file]] : []
3129
+ (configuration) => isObject(configuration) && text2(configuration.name) ? [[text2(configuration.name), configuration.file]] : []
3004
3130
  )
3005
3131
  )
3006
3132
  );
3007
3133
  for (const dependency of items(entry.dependencies)) {
3008
- const kind = isObject(dependency) ? text(dependency.kind) ?? "localTarget" : "localTarget";
3134
+ const kind = isObject(dependency) ? text2(dependency.kind) ?? "localTarget" : "localTarget";
3009
3135
  if (kind === "package" && isObject(dependency)) {
3010
3136
  ;
3011
3137
  target.dependencies.push(
@@ -3016,11 +3142,11 @@ function readXcodeJsonProject(xcodeproj, source) {
3016
3142
  target.dependencies.push(
3017
3143
  add({
3018
3144
  isa: "PBXTargetDependency",
3019
- targetProxy: proxy(dependency, text(dependency["target-id"]), "1")
3145
+ targetProxy: proxy(dependency, text2(dependency["target-id"]), "1")
3020
3146
  })
3021
3147
  );
3022
3148
  } else {
3023
- const local = isObject(dependency) ? text(dependency.target) : text(dependency);
3149
+ const local = isObject(dependency) ? text2(dependency.target) : text2(dependency);
3024
3150
  const id = local ? targetIds.get(local) : void 0;
3025
3151
  if (id)
3026
3152
  target.dependencies.push(
@@ -3042,9 +3168,9 @@ function readXcodeJsonProject(xcodeproj, source) {
3042
3168
  if (!isObject(imported)) continue;
3043
3169
  const reference = add({
3044
3170
  isa: "PBXReferenceProxy",
3045
- path: text(imported.name) ?? text(imported.path) ?? "",
3171
+ path: text2(imported.name) ?? text2(imported.path) ?? "",
3046
3172
  sourceTree: "BUILT_PRODUCTS_DIR",
3047
- remoteRef: proxy(imported, text(imported["product-id"]), "2")
3173
+ remoteRef: proxy(imported, text2(imported["product-id"]), "2")
3048
3174
  });
3049
3175
  for (const membership of items(imported["target-membership"])) {
3050
3176
  phaseFiles(isObject(membership) ? membership["build-phase"] : membership)?.push(
@@ -3056,7 +3182,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3056
3182
  const exceptions = [];
3057
3183
  for (const exception of items(folder["membership-exceptions"])) {
3058
3184
  if (!isObject(exception)) continue;
3059
- const target = targetIds.get(text(exception.target) ?? "");
3185
+ const target = targetIds.get(text2(exception.target) ?? "");
3060
3186
  if (!target) continue;
3061
3187
  exceptions.push(
3062
3188
  add({
@@ -3074,7 +3200,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3074
3200
  group.exceptions = exceptions;
3075
3201
  for (const owner of items(folder["target-membership"])) {
3076
3202
  const target = targets.find(
3077
- (candidate) => candidate.id === targetIds.get(text(owner) ?? "")
3203
+ (candidate) => candidate.id === targetIds.get(text2(owner) ?? "")
3078
3204
  );
3079
3205
  target?.target.fileSystemSynchronizedGroups?.push(id);
3080
3206
  }
@@ -3084,7 +3210,7 @@ function readXcodeJsonProject(xcodeproj, source) {
3084
3210
  isa: "PBXProject",
3085
3211
  mainGroup,
3086
3212
  projectDirPath: "",
3087
- developmentRegion: text(localizations.development) ?? "en",
3213
+ developmentRegion: text2(localizations.development) ?? "en",
3088
3214
  buildConfigurationList: configurationList(
3089
3215
  settingsOf(json["build-settings"]),
3090
3216
  /* @__PURE__ */ new Map()
@@ -3151,7 +3277,7 @@ function walkFiles(dir) {
3151
3277
  const out = [];
3152
3278
  for (const entry of fs7.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
3153
3279
  if (entry.name.startsWith(".")) continue;
3154
- const full = path9.join(dir, entry.name);
3280
+ const full = path8.join(dir, entry.name);
3155
3281
  if (entry.isDirectory()) out.push(...walkFiles(full));
3156
3282
  else if (entry.isFile()) out.push(full);
3157
3283
  }
@@ -3168,7 +3294,7 @@ function readXcconfig(file, read) {
3168
3294
  if (include) {
3169
3295
  Object.assign(
3170
3296
  settings,
3171
- readXcconfig(path9.resolve(path9.dirname(file), include[1]), read)
3297
+ readXcconfig(path8.resolve(path8.dirname(file), include[1]), read)
3172
3298
  );
3173
3299
  continue;
3174
3300
  }
@@ -3213,28 +3339,28 @@ function applyOperator(value, operator) {
3213
3339
  return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
3214
3340
  case "standardizepath":
3215
3341
  if (value === ".") return value;
3216
- if (path9.posix.isAbsolute(value))
3217
- return path9.posix.normalize(value).replace(/(?<=.)\/$/, "");
3342
+ if (path8.posix.isAbsolute(value))
3343
+ return path8.posix.normalize(value).replace(/(?<=.)\/$/, "");
3218
3344
  return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
3219
3345
  }
3220
3346
  throw new Error(`unsupported build setting operator :${operator}`);
3221
3347
  }
3222
- function decodeXml(text2) {
3223
- return text2.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
3348
+ function decodeXml(text3) {
3349
+ return text3.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
3224
3350
  }
3225
3351
  function workspaceReferences(workspace) {
3226
- const data = path9.join(workspace, "contents.xcworkspacedata");
3352
+ const data = path8.join(workspace, "contents.xcworkspacedata");
3227
3353
  if (!fs7.existsSync(data))
3228
3354
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
3229
- const container = path9.dirname(workspace);
3355
+ const container = path8.dirname(workspace);
3230
3356
  const locate = (location, base) => {
3231
3357
  const colon = location.indexOf(":");
3232
3358
  const kind = location.slice(0, colon);
3233
3359
  const rest = location.slice(colon + 1);
3234
- if (kind === "group") return path9.resolve(base, rest);
3235
- if (kind === "container" || kind === "self") return path9.resolve(container, rest);
3236
- if (kind === "absolute") return path9.resolve(rest);
3237
- throw new Error(`${path9.basename(workspace)} has an unsupported location ${location}`);
3360
+ if (kind === "group") return path8.resolve(base, rest);
3361
+ if (kind === "container" || kind === "self") return path8.resolve(container, rest);
3362
+ if (kind === "absolute") return path8.resolve(rest);
3363
+ throw new Error(`${path8.basename(workspace)} has an unsupported location ${location}`);
3238
3364
  };
3239
3365
  const groups = [container];
3240
3366
  const references = [];
@@ -3289,7 +3415,7 @@ function remotePackageRequirements(projects) {
3289
3415
  var loaded = /* @__PURE__ */ new Map();
3290
3416
  function xcodeProjectFile(xcodeproj) {
3291
3417
  for (const name of ["project.pbxproj", "project.xcproj"]) {
3292
- const file = path9.join(xcodeproj, name);
3418
+ const file = path8.join(xcodeproj, name);
3293
3419
  if (fs7.existsSync(file)) return file;
3294
3420
  }
3295
3421
  return null;
@@ -3299,7 +3425,7 @@ function loadProject(xcodeproj) {
3299
3425
  if (!projectFile)
3300
3426
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
3301
3427
  const source = fs7.readFileSync(projectFile, "utf8");
3302
- const digest = createHash8("sha256").update(source).digest("hex");
3428
+ const digest = createHash7("sha256").update(source).digest("hex");
3303
3429
  const cached = loaded.get(projectFile);
3304
3430
  if (cached?.digest === digest) return cached.project;
3305
3431
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -3316,9 +3442,9 @@ function loadProject(xcodeproj) {
3316
3442
  throw new Error(`${projectFile} has no PBXProject root`);
3317
3443
  }
3318
3444
  const projectDir = fs7.realpathSync.native(
3319
- path9.resolve(path9.dirname(xcodeproj), str(project.projectDirPath) ?? "")
3445
+ path8.resolve(path8.dirname(xcodeproj), str(project.projectDirPath) ?? "")
3320
3446
  );
3321
- const resolvePath = xcodePathResolver(objects, projectDir, path9.join);
3447
+ const resolvePath = xcodePathResolver(objects, projectDir, path8.join);
3322
3448
  const result = {
3323
3449
  xcodeproj,
3324
3450
  projectFile,
@@ -3366,7 +3492,7 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
3366
3492
  const relative2 = str(config.baseConfigurationReferenceRelativePath);
3367
3493
  const own = isDict(config.buildSettings) ? config.buildSettings : {};
3368
3494
  const directory = anchor ? project.resolvePath(anchor) : null;
3369
- const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path9.resolve(directory, relative2) : null;
3495
+ const baseFile = base ? project.resolvePath(base) : directory && relative2 ? path8.resolve(directory, relative2) : null;
3370
3496
  if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !fs7.existsSync(baseFile)))
3371
3497
  throw new Error(
3372
3498
  `Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
@@ -3458,10 +3584,10 @@ function scriptCommand(shell, script) {
3458
3584
  return [executable, ...args, "-c", script];
3459
3585
  }
3460
3586
  function expandSearchPath(directory, rules2) {
3461
- if (path9.basename(directory) !== "**") return [directory];
3587
+ if (path8.basename(directory) !== "**") return [directory];
3462
3588
  const expanded = [];
3463
3589
  const seen = /* @__PURE__ */ new Set();
3464
- const queue = [path9.dirname(directory)];
3590
+ const queue = [path8.dirname(directory)];
3465
3591
  for (let at = 0; at < queue.length; at++) {
3466
3592
  const current = queue[at];
3467
3593
  let real;
@@ -3477,7 +3603,7 @@ function expandSearchPath(directory, rules2) {
3477
3603
  if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
3478
3604
  if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
3479
3605
  continue;
3480
- queue.push(path9.join(current, entry.name));
3606
+ queue.push(path8.join(current, entry.name));
3481
3607
  }
3482
3608
  }
3483
3609
  return expanded;
@@ -3510,7 +3636,7 @@ function compilationConditions(settings) {
3510
3636
  }
3511
3637
  function expand(value, lookup) {
3512
3638
  const references = /\$([({]|[A-Za-z_][A-Za-z0-9_]*)/g;
3513
- let output2 = "";
3639
+ let output = "";
3514
3640
  let cursor = 0;
3515
3641
  for (let match = references.exec(value); match; match = references.exec(value)) {
3516
3642
  let expression = match[1];
@@ -3529,14 +3655,14 @@ function expand(value, lookup) {
3529
3655
  }
3530
3656
  const [name, ...operators] = expression.split(":");
3531
3657
  if (!name || !/^[A-Za-z_][A-Za-z0-9_-]*$/.test(name)) continue;
3532
- output2 += value.slice(cursor, match.index);
3533
- output2 += operators.reduce(
3658
+ output += value.slice(cursor, match.index);
3659
+ output += operators.reduce(
3534
3660
  (current, operator) => applyOperator(current, operator),
3535
3661
  lookup(name)
3536
3662
  );
3537
3663
  cursor = references.lastIndex = end;
3538
3664
  }
3539
- return output2 + value.slice(cursor);
3665
+ return output + value.slice(cursor);
3540
3666
  }
3541
3667
  var preparedSourcePhases = /* @__PURE__ */ new Map();
3542
3668
  function shellAssetCatalogs(script, settings, projectDir) {
@@ -3568,7 +3694,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
3568
3694
  for (const token of tokens) {
3569
3695
  if (token.startsWith("-")) break;
3570
3696
  const file = resolve(token);
3571
- if (file?.endsWith(".xcassets")) catalogs.push(path9.resolve(projectDir, file));
3697
+ if (file?.endsWith(".xcassets")) catalogs.push(path8.resolve(projectDir, file));
3572
3698
  }
3573
3699
  }
3574
3700
  return catalogs;
@@ -3613,8 +3739,8 @@ function shellCopies(script, settings, projectDir) {
3613
3739
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
3614
3740
  return [];
3615
3741
  copies.push({
3616
- from: path9.resolve(projectDir, operands[0]),
3617
- to: path9.resolve(projectDir, operands[1])
3742
+ from: path8.resolve(projectDir, operands[0]),
3743
+ to: path8.resolve(projectDir, operands[1])
3618
3744
  });
3619
3745
  }
3620
3746
  return copies;
@@ -3634,7 +3760,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3634
3760
  const copiedFiles = [];
3635
3761
  let generatedInfoPlist = false;
3636
3762
  const declaredInfoPlist = settings("INFOPLIST_FILE");
3637
- const infoPlistOutput = declaredInfoPlist ? path9.resolve(project.projectDir, declaredInfoPlist) : null;
3763
+ const infoPlistOutput = declaredInfoPlist ? path8.resolve(project.projectDir, declaredInfoPlist) : null;
3638
3764
  const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
3639
3765
  for (const phaseId of list(target.buildPhases)) {
3640
3766
  const phase = project.object(phaseId);
@@ -3649,7 +3775,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3649
3775
  copiedFiles.push(
3650
3776
  ...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
3651
3777
  );
3652
- const absolute = (raw) => path9.resolve(project.projectDir, expand(raw, settings));
3778
+ const absolute = (raw) => path8.resolve(project.projectDir, expand(raw, settings));
3653
3779
  const inputs = list(phase.inputPaths).map(absolute);
3654
3780
  const outputs = list(phase.outputPaths).map(absolute);
3655
3781
  const fileLists = /* @__PURE__ */ new Map();
@@ -3670,9 +3796,9 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3670
3796
  ...fileLists.get("OUTPUT").flatMap((item) => item.entries)
3671
3797
  ];
3672
3798
  if (allOutputs.includes(infoPlistOutput)) generatedInfoPlist = true;
3673
- for (const output2 of allOutputs)
3674
- if (output2.endsWith(".swift") && !scriptForOutput.has(output2))
3675
- scriptForOutput.set(output2, script);
3799
+ for (const output of allOutputs)
3800
+ if (output.endsWith(".swift") && !scriptForOutput.has(output))
3801
+ scriptForOutput.set(output, script);
3676
3802
  const inputFiles = [
3677
3803
  ...inputs,
3678
3804
  ...fileLists.get("INPUT").flatMap((item) => [item.file, ...item.entries]),
@@ -3682,17 +3808,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3682
3808
  for (const file of inputFiles) if (fs7.existsSync(file)) projectInputs.add(file);
3683
3809
  }
3684
3810
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
3685
- const configuration = settings("CONFIGURATION");
3686
- if (preparedXcodePhase(
3687
- project.projectFile,
3688
- targetId,
3689
- phaseId,
3690
- configuration,
3691
- allOutputs,
3692
- false
3693
- ))
3694
- continue;
3695
- const phaseDir = path9.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
3811
+ const phaseDir = path8.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
3696
3812
  for (const lists of fileLists.values())
3697
3813
  for (const { file } of lists)
3698
3814
  if (!fs7.existsSync(file))
@@ -3714,13 +3830,13 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3714
3830
  const lists = fileLists.get(kind);
3715
3831
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
3716
3832
  lists.forEach((_item, index) => {
3717
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path9.join(
3833
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = path8.join(
3718
3834
  phaseDir,
3719
3835
  `${kind}-${index}.xcfilelist`
3720
3836
  );
3721
3837
  });
3722
3838
  }
3723
- const signature = createHash8("sha256").update(
3839
+ const signature = createHash7("sha256").update(
3724
3840
  JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
3725
3841
  );
3726
3842
  for (const file of inputFiles) {
@@ -3732,22 +3848,29 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3732
3848
  }
3733
3849
  const stamp = signature.digest("hex");
3734
3850
  const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
3735
- if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs7.existsSync(file))) {
3736
- preparedXcodePhase(
3737
- project.projectFile,
3738
- targetId,
3739
- phaseId,
3740
- configuration,
3741
- allOutputs,
3742
- true
3743
- );
3851
+ if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => fs7.existsSync(file)))
3744
3852
  continue;
3745
- }
3746
3853
  fs7.mkdirSync(phaseDir, { recursive: true });
3854
+ if (process.platform === "linux") {
3855
+ const bin = swiftToolchainBin(
3856
+ privateSwiftRelease() ?? swiftNativePin().distribution.release
3857
+ );
3858
+ const startup = path8.join(phaseDir, "peach-tools.sh");
3859
+ fs7.writeFileSync(
3860
+ startup,
3861
+ 'if [[ -n "$PEACH_PHASE_BASH_ENV" ]]; then source "$PEACH_PHASE_BASH_ENV"; fi\nexport PATH="$PEACH_PHASE_TOOLCHAIN:$PATH"\n'
3862
+ );
3863
+ const { LD_LIBRARY_PATH } = swiftEnvironment(env);
3864
+ env.LD_LIBRARY_PATH = LD_LIBRARY_PATH;
3865
+ env.PEACH_PHASE_TOOLCHAIN = bin;
3866
+ env.PEACH_PHASE_BASH_ENV = env.BASH_ENV;
3867
+ env.BASH_ENV = startup;
3868
+ env.PATH = [bin, env.PATH].filter(Boolean).join(path8.delimiter);
3869
+ }
3747
3870
  fs7.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
3748
3871
  fs7.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
3749
- for (const output2 of allOutputs)
3750
- fs7.mkdirSync(path9.dirname(output2), { recursive: true });
3872
+ for (const output of allOutputs)
3873
+ fs7.mkdirSync(path8.dirname(output), { recursive: true });
3751
3874
  for (const [kind, lists] of fileLists)
3752
3875
  lists.forEach((item, index) => {
3753
3876
  fs7.writeFileSync(
@@ -3758,7 +3881,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3758
3881
  });
3759
3882
  const rawScript = str(phase.shellScript) ?? "";
3760
3883
  if (rawScript.includes("generate-modules-provider")) {
3761
- const preloadPath = path9.join(phaseDir, "expo-scan-timeout.cjs");
3884
+ const preloadPath = path8.join(phaseDir, "expo-scan-timeout.cjs");
3762
3885
  fs7.mkdirSync(phaseDir, { recursive: true });
3763
3886
  fs7.writeFileSync(
3764
3887
  preloadPath,
@@ -3790,11 +3913,11 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
3790
3913
  timeout: runScriptTimeoutMs
3791
3914
  });
3792
3915
  } catch (error) {
3793
- const output2 = error instanceof Error ? `${error.message}
3916
+ const output = error instanceof Error ? `${error.message}
3794
3917
  ${"stdout" in error ? String(error.stdout) : ""}${"stderr" in error ? String(error.stderr) : ""}` : String(error);
3795
3918
  throw new Error(
3796
3919
  `${targetName}: Run Script "${script}" failed preparing generated outputs:
3797
- ${output2}`
3920
+ ${output}`
3798
3921
  );
3799
3922
  }
3800
3923
  const missing = allOutputs.filter(
@@ -3805,21 +3928,13 @@ ${output2}`
3805
3928
  `${targetName}: Run Script "${script}" did not produce ${missing.join(", ")}`
3806
3929
  );
3807
3930
  preparedSourcePhases.set(key, stamp);
3808
- preparedXcodePhase(
3809
- project.projectFile,
3810
- targetId,
3811
- phaseId,
3812
- configuration,
3813
- allOutputs,
3814
- true
3815
- );
3816
3931
  }
3817
3932
  }
3818
3933
  project.visitMembers(
3819
3934
  targetId,
3820
- xcodePathResolver(project.objects, project.projectDir, path9.join, settings),
3935
+ xcodePathResolver(project.objects, project.projectDir, path8.join, settings),
3821
3936
  (file) => isDirectory(file) ? walkFiles(file) : fs7.existsSync(file) ? [file] : [],
3822
- path9.join,
3937
+ path8.join,
3823
3938
  (file, kind, bundleName) => {
3824
3939
  if (kind === "header") {
3825
3940
  headers.add(file);
@@ -3832,7 +3947,7 @@ ${output2}`
3832
3947
  }
3833
3948
  if (!fs7.existsSync(file)) {
3834
3949
  if (options.requireSources === false) return;
3835
- const script = scriptForOutput.get(path9.normalize(file));
3950
+ const script = scriptForOutput.get(path8.normalize(file));
3836
3951
  throw new Error(
3837
3952
  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}`
3838
3953
  );
@@ -3843,7 +3958,7 @@ ${output2}`
3843
3958
  );
3844
3959
  if (options.prepareGeneratedSources && options.requireSources !== false) {
3845
3960
  const interfaceFiles = [...resources].filter(
3846
- (file) => /\.(storyboard|xib)$/.test(file) && !file.split(path9.sep).some((part) => part.endsWith(".bundle"))
3961
+ (file) => /\.(storyboard|xib)$/.test(file) && !file.split(path8.sep).some((part) => part.endsWith(".bundle"))
3847
3962
  );
3848
3963
  if (process.platform !== "darwin") {
3849
3964
  let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
@@ -3853,7 +3968,7 @@ ${output2}`
3853
3968
  if (typeof declared === "string") launchName = expand(declared, settings);
3854
3969
  }
3855
3970
  const runtimeInterfaceFiles = interfaceFiles.filter(
3856
- (file) => path9.basename(file, path9.extname(file)) !== launchName
3971
+ (file) => path8.basename(file, path8.extname(file)) !== launchName
3857
3972
  );
3858
3973
  if (runtimeInterfaceFiles.length > 0)
3859
3974
  throw new Error(
@@ -3864,21 +3979,21 @@ ${output2}`
3864
3979
  }
3865
3980
  const interfaceOutputs = /* @__PURE__ */ new Set();
3866
3981
  for (const file of interfaceFiles) {
3867
- const localization = file.split(path9.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
3982
+ const localization = file.split(path8.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
3868
3983
  const extension = file.endsWith(".storyboard") ? ".storyboardc" : ".nib";
3869
- const output2 = path9.join(
3984
+ const output = path8.join(
3870
3985
  settings("DERIVED_FILE_DIR"),
3871
3986
  "InterfaceBuilder",
3872
3987
  localization,
3873
- path9.basename(file, path9.extname(file)) + extension
3988
+ path8.basename(file, path8.extname(file)) + extension
3874
3989
  );
3875
- if (interfaceOutputs.has(output2))
3876
- throw new Error(`${targetName}: duplicate Interface Builder output ${output2}`);
3877
- interfaceOutputs.add(output2);
3990
+ if (interfaceOutputs.has(output))
3991
+ throw new Error(`${targetName}: duplicate Interface Builder output ${output}`);
3992
+ interfaceOutputs.add(output);
3878
3993
  const args = [
3879
3994
  "ibtool",
3880
3995
  "--compile",
3881
- output2,
3996
+ output,
3882
3997
  file,
3883
3998
  "--module",
3884
3999
  settings("PRODUCT_MODULE_NAME")
@@ -3888,16 +4003,16 @@ ${output2}`
3888
4003
  const families = settings("TARGETED_DEVICE_FAMILY").split(",").map((value) => value.trim());
3889
4004
  if (families.includes("1")) args.push("--target-device", "iphone");
3890
4005
  if (families.includes("2")) args.push("--target-device", "ipad");
3891
- const stamp = `${output2}.peach-inputs`;
4006
+ const stamp = `${output}.peach-inputs`;
3892
4007
  const inputs = JSON.stringify({
3893
4008
  args,
3894
4009
  developer: settings("DEVELOPER_DIR"),
3895
- source: createHash8("sha256").update(fs7.readFileSync(file)).digest("hex")
4010
+ source: createHash7("sha256").update(fs7.readFileSync(file)).digest("hex")
3896
4011
  });
3897
- if (!fs7.existsSync(output2) || !fs7.existsSync(stamp) || fs7.readFileSync(stamp, "utf8") !== inputs) {
3898
- fs7.rmSync(output2, { recursive: true, force: true });
4012
+ if (!fs7.existsSync(output) || !fs7.existsSync(stamp) || fs7.readFileSync(stamp, "utf8") !== inputs) {
4013
+ fs7.rmSync(output, { recursive: true, force: true });
3899
4014
  fs7.rmSync(stamp, { force: true });
3900
- fs7.mkdirSync(path9.dirname(output2), { recursive: true });
4015
+ fs7.mkdirSync(path8.dirname(output), { recursive: true });
3901
4016
  execFileSync3("xcrun", args, {
3902
4017
  cwd: project.projectDir,
3903
4018
  stdio: ["ignore", "pipe", "pipe"],
@@ -3907,7 +4022,7 @@ ${output2}`
3907
4022
  }
3908
4023
  projectInputs.add(file);
3909
4024
  resources.delete(file);
3910
- for (const compiled of isDirectory(output2) ? walkFiles(output2) : [output2])
4025
+ for (const compiled of isDirectory(output) ? walkFiles(output) : [output])
3911
4026
  resources.add(compiled);
3912
4027
  }
3913
4028
  const definitions = [...allSources].filter(
@@ -3920,20 +4035,20 @@ ${output2}`
3920
4035
  for (const definition of definitions) {
3921
4036
  const configuredLanguage = settings("INTENTS_CODEGEN_LANGUAGE");
3922
4037
  const language = !configuredLanguage || configuredLanguage === "Automatic" ? sources.size > 0 ? "Swift" : "Objective-C" : configuredLanguage;
3923
- const output2 = path9.join(
4038
+ const output = path8.join(
3924
4039
  settings("DERIVED_FILE_DIR"),
3925
4040
  "IntentDefinitionGenerated",
3926
- path9.basename(definition, ".intentdefinition")
4041
+ path8.basename(definition, ".intentdefinition")
3927
4042
  );
3928
- fs7.rmSync(output2, { recursive: true, force: true });
3929
- fs7.mkdirSync(output2, { recursive: true });
4043
+ fs7.rmSync(output, { recursive: true, force: true });
4044
+ fs7.mkdirSync(output, { recursive: true });
3930
4045
  const args = [
3931
4046
  "intentbuilderc",
3932
4047
  "generate",
3933
4048
  "-input",
3934
4049
  definition,
3935
4050
  "-output",
3936
- output2,
4051
+ output,
3937
4052
  "-classPrefix",
3938
4053
  settings("PROJECT_CLASS_PREFIX"),
3939
4054
  "-language",
@@ -3950,12 +4065,12 @@ ${output2}`
3950
4065
  stdio: ["ignore", "pipe", "pipe"],
3951
4066
  timeout: runScriptTimeoutMs
3952
4067
  });
3953
- const compiled = path9.join(
4068
+ const compiled = path8.join(
3954
4069
  settings("DERIVED_FILE_DIR"),
3955
4070
  "IntentDefinitionCompiled",
3956
- definition.split(path9.sep).findLast((part) => part.endsWith(".lproj")) ?? ""
4071
+ definition.split(path8.sep).findLast((part) => part.endsWith(".lproj")) ?? ""
3957
4072
  );
3958
- const compiledDefinition = path9.join(compiled, path9.basename(definition));
4073
+ const compiledDefinition = path8.join(compiled, path8.basename(definition));
3959
4074
  fs7.rmSync(compiledDefinition, { force: true });
3960
4075
  fs7.mkdirSync(compiled, { recursive: true });
3961
4076
  execFileSync3(
@@ -3978,7 +4093,7 @@ ${output2}`
3978
4093
  );
3979
4094
  resources.add(compiledDefinition);
3980
4095
  projectInputs.add(definition);
3981
- for (const file of walkFiles(output2)) {
4096
+ for (const file of walkFiles(output)) {
3982
4097
  allSources.add(file);
3983
4098
  if (file.endsWith(".swift")) sources.add(file);
3984
4099
  if (HEADER_FILE.test(file)) headers.add(file);
@@ -3998,22 +4113,22 @@ ${output2}`
3998
4113
  function commonAncestor(dirs) {
3999
4114
  let common = dirs[0];
4000
4115
  for (const dir of dirs) {
4001
- while (common !== path9.dirname(common) && path9.relative(common, dir).startsWith(".."))
4002
- common = path9.dirname(common);
4116
+ while (common !== path8.dirname(common) && path8.relative(common, dir).startsWith(".."))
4117
+ common = path8.dirname(common);
4003
4118
  }
4004
4119
  return common;
4005
4120
  }
4006
- var isPodsProject = (xcodeproj) => path9.basename(xcodeproj) === "Pods.xcodeproj" && path9.basename(path9.dirname(xcodeproj)) === "Pods";
4121
+ var isPodsProject = (xcodeproj) => path8.basename(xcodeproj) === "Pods.xcodeproj" && path8.basename(path8.dirname(xcodeproj)) === "Pods";
4007
4122
  function installedPodsSandbox(pods) {
4008
- const podfileLock = path9.join(path9.dirname(pods), "Podfile.lock");
4009
- const manifestLock = path9.join(pods, "Manifest.lock");
4123
+ const podfileLock = path8.join(path8.dirname(pods), "Podfile.lock");
4124
+ const manifestLock = path8.join(pods, "Manifest.lock");
4010
4125
  if (!fs7.existsSync(podfileLock))
4011
4126
  throw new Error(
4012
- `${pods} has no ${podfileLock}: run \`pod install\` in ${path9.dirname(pods)}`
4127
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${path8.dirname(pods)}`
4013
4128
  );
4014
4129
  if (!fs7.existsSync(manifestLock) || !fs7.readFileSync(manifestLock).equals(fs7.readFileSync(podfileLock)))
4015
4130
  throw new Error(
4016
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path9.dirname(pods)}`
4131
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${path8.dirname(pods)}`
4017
4132
  );
4018
4133
  const specChecksums = {};
4019
4134
  const lines = fs7.readFileSync(manifestLock, "utf8").split("\n");
@@ -4023,12 +4138,28 @@ function installedPodsSandbox(pods) {
4023
4138
  if (!entry) break;
4024
4139
  specChecksums[entry[1]] = entry[2];
4025
4140
  }
4026
- const specs = path9.join(pods, "Local Podspecs");
4141
+ const specs = path8.join(pods, "Local Podspecs");
4142
+ const generated = path8.join(pods, POD_GRAPH_SPECIFICATIONS);
4143
+ if (fs7.existsSync(generated))
4144
+ return {
4145
+ podfileLock,
4146
+ manifestLock,
4147
+ specChecksums,
4148
+ localPodspecs: readPodGraphSpecifications(generated),
4149
+ specificationFiles: [generated]
4150
+ };
4151
+ const specificationFiles = isDirectory(specs) ? fs7.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => path8.join(specs, name)) : [];
4027
4152
  return {
4028
4153
  podfileLock,
4029
4154
  manifestLock,
4030
4155
  specChecksums,
4031
- localPodspecs: isDirectory(specs) ? fs7.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => path9.join(specs, name)) : []
4156
+ localPodspecs: new Map(
4157
+ specificationFiles.map((file) => [
4158
+ path8.basename(file, ".podspec.json"),
4159
+ fs7.readFileSync(file, "utf8")
4160
+ ])
4161
+ ),
4162
+ specificationFiles
4032
4163
  };
4033
4164
  }
4034
4165
  function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
@@ -4040,14 +4171,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
4040
4171
  if (!xcodeProjectFile(xcodeproj)) {
4041
4172
  if (installedPods && isPodsProject(xcodeproj))
4042
4173
  throw new Error(
4043
- `${path9.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path9.dirname(path9.dirname(xcodeproj))}`
4174
+ `${path8.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${path8.dirname(path8.dirname(xcodeproj))}`
4044
4175
  );
4045
4176
  return;
4046
4177
  }
4047
4178
  const key = fs7.realpathSync.native(xcodeproj);
4048
- if (projectAt.has(key) || !installedPods && key.split(path9.sep).includes("Pods"))
4179
+ if (projectAt.has(key) || !installedPods && key.split(path8.sep).includes("Pods"))
4049
4180
  return;
4050
- if (isPodsProject(key)) cocoapods = installedPodsSandbox(path9.dirname(key));
4181
+ if (isPodsProject(key)) cocoapods = installedPodsSandbox(path8.dirname(key));
4051
4182
  const project = loadProject(key);
4052
4183
  projectAt.set(key, project);
4053
4184
  projects.push(project);
@@ -4063,12 +4194,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
4063
4194
  for (const reference of listed)
4064
4195
  if (reference.endsWith(".xcodeproj")) addProject(reference);
4065
4196
  if (projects.length === 0) {
4066
- throw new Error(`${path9.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
4197
+ throw new Error(`${path8.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
4067
4198
  }
4068
- const podfile = path9.join(path9.dirname(xcodeprojOrWorkspace), "Podfile");
4199
+ const podfile = path8.join(path8.dirname(xcodeprojOrWorkspace), "Podfile");
4069
4200
  if (installedPods && !cocoapods && fs7.existsSync(podfile))
4070
4201
  throw new Error(
4071
- `${podfile} is not installed into ${path9.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path9.dirname(podfile)} and open the workspace it writes`
4202
+ `${podfile} is not installed into ${path8.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${path8.dirname(podfile)} and open the workspace it writes`
4072
4203
  );
4073
4204
  return { listed, projects, projectAt, cocoapods };
4074
4205
  }
@@ -4121,26 +4252,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
4121
4252
  ];
4122
4253
  const found = containers.flatMap(
4123
4254
  (dir) => [
4124
- path9.join(dir, "xcshareddata"),
4125
- ...isDirectory(path9.join(dir, "xcuserdata")) ? fs7.readdirSync(path9.join(dir, "xcuserdata")).sort().map((user) => path9.join(dir, "xcuserdata", user)) : []
4255
+ path8.join(dir, "xcshareddata"),
4256
+ ...isDirectory(path8.join(dir, "xcuserdata")) ? fs7.readdirSync(path8.join(dir, "xcuserdata")).sort().map((user) => path8.join(dir, "xcuserdata", user)) : []
4126
4257
  ].map((data) => ({
4127
4258
  dir,
4128
- file: path9.join(data, "xcschemes", `${scheme}.xcscheme`)
4259
+ file: path8.join(data, "xcschemes", `${scheme}.xcscheme`)
4129
4260
  }))
4130
4261
  ).find((candidate) => fs7.existsSync(candidate.file));
4131
4262
  if (!found) {
4132
4263
  const known = containers.flatMap(
4133
- (dir) => fs7.existsSync(path9.join(dir, "xcshareddata", "xcschemes")) ? fs7.readdirSync(path9.join(dir, "xcshareddata", "xcschemes")).filter((name2) => name2.endsWith(".xcscheme")).map((name2) => name2.slice(0, -".xcscheme".length)).sort() : []
4264
+ (dir) => fs7.existsSync(path8.join(dir, "xcshareddata", "xcschemes")) ? fs7.readdirSync(path8.join(dir, "xcshareddata", "xcschemes")).filter((name2) => name2.endsWith(".xcscheme")).map((name2) => name2.slice(0, -".xcscheme".length)).sort() : []
4134
4265
  );
4135
4266
  throw new Error(
4136
- `${path9.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
4267
+ `${path8.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
4137
4268
  );
4138
4269
  }
4139
4270
  const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
4140
4271
  fs7.readFileSync(found.file, "utf8")
4141
4272
  );
4142
- const attribute = (text2, name2) => {
4143
- const value = new RegExp(`\\b${name2}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
4273
+ const attribute = (text3, name2) => {
4274
+ const value = new RegExp(`\\b${name2}\\s*=\\s*"([^"]*)"`).exec(text3)?.[1];
4144
4275
  return value === void 0 ? void 0 : decodeXml(value);
4145
4276
  };
4146
4277
  const runnable = launch ? /<BuildableProductRunnable\b[\s\S]*?<BuildableReference\b([^>]*)>/.exec(launch[2]) : null;
@@ -4150,8 +4281,8 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
4150
4281
  if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
4151
4282
  throw new Error(`scheme ${scheme} runs no application target`);
4152
4283
  }
4153
- const projectPath = path9.resolve(
4154
- path9.dirname(found.dir),
4284
+ const projectPath = path8.resolve(
4285
+ path8.dirname(found.dir),
4155
4286
  referenced.slice("container:".length)
4156
4287
  );
4157
4288
  const project = projects.find(
@@ -4175,26 +4306,26 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
4175
4306
  var NativeAppTargetSelectionError = class extends Error {
4176
4307
  };
4177
4308
  function selectIosAppTarget(projectRoot, iosTarget) {
4178
- const nested = path9.join(projectRoot, "ios");
4309
+ const nested = path8.join(projectRoot, "ios");
4179
4310
  const iosRoot = fs7.existsSync(nested) ? nested : projectRoot;
4180
4311
  const entries = fs7.readdirSync(iosRoot, { withFileTypes: true });
4181
4312
  const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
4182
- xcodeproj: path9.join(iosRoot, entry.name),
4313
+ xcodeproj: path8.join(iosRoot, entry.name),
4183
4314
  workspace: null
4184
4315
  })) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
4185
- const workspace = path9.join(iosRoot, entry.name);
4316
+ const workspace = path8.join(iosRoot, entry.name);
4186
4317
  return workspaceReferences(workspace).map((xcodeproj2) => ({
4187
4318
  xcodeproj: xcodeproj2,
4188
4319
  workspace
4189
4320
  }));
4190
4321
  }).filter(
4191
- ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path9.sep).includes("Pods") && fs7.existsSync(xcodeproj2)
4322
+ ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(path8.sep).includes("Pods") && fs7.existsSync(xcodeproj2)
4192
4323
  ).filter(
4193
4324
  ({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
4194
4325
  )).map(({ xcodeproj: xcodeproj2, workspace }) => ({
4195
4326
  xcodeproj: xcodeproj2,
4196
4327
  workspace,
4197
- name: path9.basename(xcodeproj2)
4328
+ name: path8.basename(xcodeproj2)
4198
4329
  }));
4199
4330
  if (projects.length === 0) return null;
4200
4331
  if (projects.length > 1 && !iosTarget) {
@@ -4235,11 +4366,11 @@ function selectIosAppTarget(projectRoot, iosTarget) {
4235
4366
  const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
4236
4367
  const container = fs7.existsSync(workspace) ? workspace : xcodeproj;
4237
4368
  const hasScheme = [container, xcodeproj].some((dir) => {
4238
- if (fs7.existsSync(path9.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
4369
+ if (fs7.existsSync(path8.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
4239
4370
  return true;
4240
- const users = path9.join(dir, "xcuserdata");
4371
+ const users = path8.join(dir, "xcuserdata");
4241
4372
  return fs7.existsSync(users) && fs7.readdirSync(users).some(
4242
- (user) => fs7.existsSync(path9.join(users, user, "xcschemes", `${target}.xcscheme`))
4373
+ (user) => fs7.existsSync(path8.join(users, user, "xcschemes", `${target}.xcscheme`))
4243
4374
  );
4244
4375
  });
4245
4376
  if (hasScheme) target = readXcodeScheme(container, target).target;
@@ -4250,8 +4381,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
4250
4381
  );
4251
4382
  return { xcodeproj, target, workspace: project.workspace };
4252
4383
  }
4253
- var workspaceResolvedFile = (xcodeprojOrWorkspace) => path9.join(
4254
- xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path9.join(xcodeprojOrWorkspace, "project.xcworkspace"),
4384
+ var workspaceResolvedFile = (xcodeprojOrWorkspace) => path8.join(
4385
+ xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : path8.join(xcodeprojOrWorkspace, "project.xcworkspace"),
4255
4386
  "xcshareddata",
4256
4387
  "swiftpm",
4257
4388
  "Package.resolved"
@@ -4279,7 +4410,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4279
4410
  (ref) => options.frameworkMachOType ? ref.target.name === targetName && FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "") : isIosAppTarget(ref, options) || targetName !== void 0 && ref.target.name === targetName && ref.target.productType === APP_EXTENSION
4280
4411
  );
4281
4412
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
4282
- const container = path9.basename(xcodeprojOrWorkspace);
4413
+ const container = path8.basename(xcodeprojOrWorkspace);
4283
4414
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
4284
4415
  if (named.length !== 1) {
4285
4416
  if (options.frameworkMachOType)
@@ -4304,8 +4435,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4304
4435
  for (const ref of allTargets) {
4305
4436
  const product = ref.project.object(str(ref.target.productReference));
4306
4437
  const file = str(product?.path);
4307
- if (file && !byProduct.has(path9.basename(file)))
4308
- byProduct.set(path9.basename(file), ref);
4438
+ if (file && !byProduct.has(path8.basename(file)))
4439
+ byProduct.set(path8.basename(file), ref);
4309
4440
  }
4310
4441
  const proxied = (project, proxyId) => {
4311
4442
  const proxy = project.object(proxyId);
@@ -4329,7 +4460,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4329
4460
  const buildFile = project.object(buildFileId);
4330
4461
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
4331
4462
  const file = project.object(str(buildFile.fileRef));
4332
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path9.basename(str(file.path) ?? "")) : void 0;
4463
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(path8.basename(str(file.path) ?? "")) : void 0;
4333
4464
  if (resolved)
4334
4465
  found.push({
4335
4466
  target: resolved,
@@ -4410,7 +4541,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4410
4541
  const otherProduct = productName(other);
4411
4542
  for (const { file, visibility } of headerPhase(other)) {
4412
4543
  if (visibility === "Project") continue;
4413
- const key = `${otherProduct}/${path9.basename(file)}`;
4544
+ const key = `${otherProduct}/${path8.basename(file)}`;
4414
4545
  if (!headers.has(key)) headers.set(key, file);
4415
4546
  }
4416
4547
  }
@@ -4441,7 +4572,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4441
4572
  ref.id,
4442
4573
  ref.project.resolvePath,
4443
4574
  (file) => isDirectory(file) ? walkFiles(file) : fs7.existsSync(file) ? [file] : [],
4444
- path9.join,
4575
+ path8.join,
4445
4576
  (file, kind) => {
4446
4577
  if (kind === "header") found.push(file);
4447
4578
  }
@@ -4457,12 +4588,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4457
4588
  for (const ref of projectTargets(project)) {
4458
4589
  const product = productName(ref);
4459
4590
  for (const { file, visibility } of headerPhase(ref)) {
4460
- const name = path9.basename(file);
4591
+ const name = path8.basename(file);
4461
4592
  if (!entries.has(name))
4462
4593
  entries.set(name, visibility !== "Project" ? `${product}/${name}` : file);
4463
4594
  }
4464
4595
  for (const file of synchronizedHeaders(ref)) {
4465
- const name = path9.basename(file);
4596
+ const name = path8.basename(file);
4466
4597
  if (!entries.has(name)) entries.set(name, file);
4467
4598
  }
4468
4599
  }
@@ -4472,7 +4603,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4472
4603
  if (folder === null) continue;
4473
4604
  for (const file of walkFiles(folder)) {
4474
4605
  if (!HEADER_FILE.test(file)) continue;
4475
- const name = path9.basename(file);
4606
+ const name = path8.basename(file);
4476
4607
  if (!entries.has(name)) entries.set(name, file);
4477
4608
  }
4478
4609
  }
@@ -4480,18 +4611,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4480
4611
  for (const id of Object.keys(project.objects)) {
4481
4612
  if (project.object(id)?.isa !== "PBXFileReference") continue;
4482
4613
  const file = project.resolvePath(id);
4483
- if (file && HEADER_FILE.test(file) && !entries.has(path9.basename(file)))
4484
- entries.set(path9.basename(file), file);
4614
+ if (file && HEADER_FILE.test(file) && !entries.has(path8.basename(file)))
4615
+ entries.set(path8.basename(file), file);
4485
4616
  }
4486
4617
  const map = [...entries];
4487
4618
  projectHeaderMaps.set(project, map);
4488
4619
  return map;
4489
4620
  };
4490
4621
  const xcconfigs = /* @__PURE__ */ new Set();
4491
- const buildDir = (project) => path9.join(project.projectDir, ".build/peach-xcode/Build");
4622
+ const buildDir = (project) => path8.join(project.projectDir, ".build/peach-xcode/Build");
4492
4623
  const workspaceBuild = {
4493
- SYMROOT: path9.join(buildDir(app.project), "Products"),
4494
- OBJROOT: path9.join(buildDir(app.project), "Intermediates.noindex")
4624
+ SYMROOT: path8.join(buildDir(app.project), "Products"),
4625
+ OBJROOT: path8.join(buildDir(app.project), "Intermediates.noindex")
4495
4626
  };
4496
4627
  const moduleTarget = (ref) => {
4497
4628
  const name = str(ref.target.name) ?? ref.id;
@@ -4506,16 +4637,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4506
4637
  TARGET_NAME: name,
4507
4638
  TARGETNAME: "$(TARGET_NAME)",
4508
4639
  PROJECT: "$(PROJECT_NAME)",
4509
- PROJECT_NAME: path9.basename(ref.project.xcodeproj, ".xcodeproj"),
4640
+ PROJECT_NAME: path8.basename(ref.project.xcodeproj, ".xcodeproj"),
4510
4641
  PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
4511
4642
  PROJECT_FILE_PATH: ref.project.xcodeproj,
4512
4643
  SRCROOT: ref.project.projectDir,
4513
4644
  SOURCE_ROOT: ref.project.projectDir,
4514
4645
  PROJECT_DIR: ref.project.projectDir,
4515
- SYMROOT: path9.join(buildDir(ref.project), "Products"),
4646
+ SYMROOT: path8.join(buildDir(ref.project), "Products"),
4516
4647
  BUILD_DIR: "$(SYMROOT)",
4517
4648
  BUILD_ROOT: "$(SYMROOT)",
4518
- OBJROOT: path9.join(buildDir(ref.project), "Intermediates.noindex"),
4649
+ OBJROOT: path8.join(buildDir(ref.project), "Intermediates.noindex"),
4519
4650
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
4520
4651
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
4521
4652
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
@@ -4559,12 +4690,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4559
4690
  const { headers, allSources, ...members } = targetMembers(
4560
4691
  ref,
4561
4692
  settings2,
4562
- options,
4693
+ ref === app && options.nativeModules ? { ...options, requireSources: false } : options,
4563
4694
  keys,
4564
4695
  xcconfigs
4565
4696
  );
4566
4697
  const searchRules = recursiveSearchRules(settings2);
4567
- const absolute = (file) => path9.resolve(ref.project.projectDir, file);
4698
+ const absolute = (file) => path8.resolve(ref.project.projectDir, file);
4568
4699
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
4569
4700
  const product = settings2("PRODUCT_NAME");
4570
4701
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -4595,7 +4726,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4595
4726
  `${name}: Swift compatibility header phase has no Swift producer sources`
4596
4727
  );
4597
4728
  const building = options.prepareGeneratedSources && options.requireSources !== false;
4598
- const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path9.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
4729
+ const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? path8.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
4599
4730
  if (versioning) {
4600
4731
  const version = settings2("CURRENT_PROJECT_VERSION");
4601
4732
  const custom = [
@@ -4608,7 +4739,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4608
4739
  ].filter((key) => settings2(key));
4609
4740
  if (custom.length)
4610
4741
  throw new Error(
4611
- `${name}: Xcode generates ${path9.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
4742
+ `${name}: Xcode generates ${path8.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
4612
4743
  );
4613
4744
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
4614
4745
  const [major, minor] = version.split(".");
@@ -4622,7 +4753,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4622
4753
  ""
4623
4754
  ].join("\n");
4624
4755
  if (!fs7.existsSync(versioning) || fs7.readFileSync(versioning, "utf8") !== unit) {
4625
- fs7.mkdirSync(path9.dirname(versioning), { recursive: true });
4756
+ fs7.mkdirSync(path8.dirname(versioning), { recursive: true });
4626
4757
  fs7.writeFileSync(versioning, unit);
4627
4758
  }
4628
4759
  allSources.push(versioning);
@@ -4642,7 +4773,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4642
4773
  const headerFiles = headerPhase(ref);
4643
4774
  const ownHeaders = /* @__PURE__ */ new Map();
4644
4775
  for (const { file, visibility } of headerFiles) {
4645
- const name2 = path9.basename(file);
4776
+ const name2 = path8.basename(file);
4646
4777
  const published = visibility !== "Project";
4647
4778
  if (!ownHeaders.has(name2))
4648
4779
  ownHeaders.set(name2, published ? `${product}/${name2}` : file);
@@ -4650,27 +4781,27 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4650
4781
  ownHeaders.set(`${product}/${name2}`, file);
4651
4782
  }
4652
4783
  for (const file of synchronizedHeaders(ref)) {
4653
- const name2 = path9.basename(file);
4784
+ const name2 = path8.basename(file);
4654
4785
  if (ownHeaders.has(name2)) continue;
4655
4786
  ownHeaders.set(name2, file);
4656
4787
  const qualified = `${product}/${name2}`;
4657
4788
  if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file);
4658
4789
  }
4659
4790
  const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
4660
- const wrapper = path9.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
4791
+ const wrapper = path8.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
4661
4792
  const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
4662
- const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path9.join(path9.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
4793
+ const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? path8.join(path8.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
4663
4794
  const frameworkCompatibility = frameworkUmbrella && moduleMap && fs7.existsSync(moduleMap) && fs7.existsSync(frameworkUmbrella) ? {
4664
4795
  framework: true,
4665
4796
  moduleMap,
4666
4797
  umbrella: frameworkUmbrella,
4667
- outputModuleMap: path9.join(wrapper, "Modules", "module.modulemap"),
4668
- outputUmbrella: path9.join(
4798
+ outputModuleMap: path8.join(wrapper, "Modules", "module.modulemap"),
4799
+ outputUmbrella: path8.join(
4669
4800
  wrapper,
4670
4801
  "Headers",
4671
- path9.basename(frameworkUmbrella)
4802
+ path8.basename(frameworkUmbrella)
4672
4803
  ),
4673
- outputHeader: path9.join(
4804
+ outputHeader: path8.join(
4674
4805
  wrapper,
4675
4806
  "Headers",
4676
4807
  settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
@@ -4684,9 +4815,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4684
4815
  outputUmbrella: compatibility.outputUmbrella,
4685
4816
  outputHeader: compatibility.outputHeader
4686
4817
  } : frameworkCompatibility;
4687
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path9.relative(path9.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path9.sep)[0] !== ".." && fs7.existsSync(moduleMap) ? fs7.readdirSync(path9.dirname(moduleMap)).flatMap((entry) => {
4818
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && path8.relative(path8.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(path8.sep)[0] !== ".." && fs7.existsSync(moduleMap) ? fs7.readdirSync(path8.dirname(moduleMap)).flatMap((entry) => {
4688
4819
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
4689
- const file = path9.join(path9.dirname(moduleMap), entry);
4820
+ const file = path8.join(path8.dirname(moduleMap), entry);
4690
4821
  return fs7.existsSync(file) ? [file] : [];
4691
4822
  }) : [];
4692
4823
  const fileFlags = {};
@@ -4768,15 +4899,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4768
4899
  // xcode searches its products' include directory before
4769
4900
  // HEADER_SEARCH_PATHS and the target's derived sources after.
4770
4901
  headerSearchPaths: [
4771
- path9.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
4902
+ path8.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
4772
4903
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
4773
4904
  (raw) => expandSearchPath(absolute(raw), searchRules)
4774
4905
  ),
4775
- path9.join(
4906
+ path8.join(
4776
4907
  `${settings2("DERIVED_FILE_DIR")}-normal`,
4777
4908
  settings2("CURRENT_ARCH")
4778
4909
  ),
4779
- path9.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
4910
+ path8.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
4780
4911
  settings2("DERIVED_FILE_DIR")
4781
4912
  ],
4782
4913
  userHeaderSearchPaths: settingList(
@@ -4826,10 +4957,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4826
4957
  ...headerFiles.flatMap(
4827
4958
  ({ file, visibility }) => visibility === "Project" ? [] : [
4828
4959
  [
4829
- path9.join(
4960
+ path8.join(
4830
4961
  wrapper,
4831
4962
  visibility === "Public" ? "Headers" : "PrivateHeaders",
4832
- path9.basename(file)
4963
+ path8.basename(file)
4833
4964
  ),
4834
4965
  file
4835
4966
  ]
@@ -4843,7 +4974,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4843
4974
  return [];
4844
4975
  const destination = expand(
4845
4976
  str(phase.dstPath) ?? "",
4846
- (name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? path9.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? path9.join(wrapper, "PrivateHeaders") : settings2(name2)
4977
+ (name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? path8.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? path8.join(wrapper, "PrivateHeaders") : settings2(name2)
4847
4978
  );
4848
4979
  return list(phase.files).flatMap((id) => {
4849
4980
  const file = ref.project.resolvePath(
@@ -4851,17 +4982,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4851
4982
  );
4852
4983
  return file && HEADER_FILE.test(file) ? [
4853
4984
  [
4854
- path9.resolve(
4985
+ path8.resolve(
4855
4986
  settings2("BUILT_PRODUCTS_DIR"),
4856
4987
  destination,
4857
- path9.basename(file)
4988
+ path8.basename(file)
4858
4989
  ),
4859
4990
  file
4860
4991
  ]
4861
4992
  ] : [];
4862
4993
  });
4863
4994
  }),
4864
- ...moduleMap ? [[path9.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
4995
+ ...moduleMap ? [[path8.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
4865
4996
  ]) : Object.fromEntries([
4866
4997
  ...podHeaders.map((file) => [file, file]),
4867
4998
  ...moduleMap ? [[moduleMap, moduleMap]] : []
@@ -4898,7 +5029,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4898
5029
  const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module2 }) => ({ ref, framework: module2 }));
4899
5030
  const frameworks = frameworkTargets.map(({ framework }) => framework);
4900
5031
  const podSourceDirs = builtTargets.slice(0, -1).flatMap(
4901
- ({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path9.dirname(file)).filter((dir) => fs7.existsSync(dir)) : []
5032
+ ({ ref, module: module2 }) => isPodsProject(ref.project.xcodeproj) ? [...module2.allSources, ...module2.objc?.headers ?? []].map((file) => path8.dirname(file)).filter((dir) => fs7.existsSync(dir)) : []
4902
5033
  );
4903
5034
  const expandValue = (value, settings2) => {
4904
5035
  if (typeof value === "string") return expand(value, settings2);
@@ -4919,7 +5050,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4919
5050
  const phase = owner.ref.project.object(phaseId);
4920
5051
  if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
4921
5052
  continue;
4922
- const absolute = (raw) => path9.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
5053
+ const absolute = (raw) => path8.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
4923
5054
  const entries = (paths) => paths.flatMap((raw) => {
4924
5055
  const file = absolute(raw);
4925
5056
  xcconfigs.add(file);
@@ -4935,7 +5066,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4935
5066
  ].filter((file) => file.endsWith(".bundle"));
4936
5067
  if (inputs.length !== outputs.length)
4937
5068
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
4938
- const destinationRoot = path9.join(
5069
+ const destinationRoot = path8.join(
4939
5070
  owner.settings("TARGET_BUILD_DIR"),
4940
5071
  owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
4941
5072
  );
@@ -4944,24 +5075,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4944
5075
  const file = str(
4945
5076
  target.ref.project.object(str(target.ref.target.productReference))?.path
4946
5077
  );
4947
- return file && path9.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
5078
+ return file && path8.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
4948
5079
  });
4949
5080
  if (!product && !isDirectory(input2))
4950
5081
  throw new Error(
4951
5082
  `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
4952
5083
  );
4953
- const destination = path9.relative(destinationRoot, outputs[index]);
4954
- if (destination === ".." || destination.startsWith(`..${path9.sep}`) || path9.isAbsolute(destination) || path9.basename(input2) !== path9.basename(destination))
5084
+ const destination = path8.relative(destinationRoot, outputs[index]);
5085
+ if (destination === ".." || destination.startsWith(`..${path8.sep}`) || path8.isAbsolute(destination) || path8.basename(input2) !== path8.basename(destination))
4955
5086
  throw new Error(
4956
5087
  `${owner.module.name}: invalid resource bundle copy destination`
4957
5088
  );
4958
- const infoFile = product ? path9.resolve(
5089
+ const infoFile = product ? path8.resolve(
4959
5090
  product.ref.project.projectDir,
4960
5091
  product.settings("INFOPLIST_FILE")
4961
5092
  ) : null;
4962
5093
  if (infoFile) xcconfigs.add(infoFile);
4963
5094
  const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
4964
- const bundlePath = prefix + destination.split(path9.sep).join("/");
5095
+ const bundlePath = prefix + destination.split(path8.sep).join("/");
4965
5096
  if (resourceProducts.some((resource) => resource.path === bundlePath))
4966
5097
  throw new Error(
4967
5098
  `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
@@ -4977,15 +5108,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
4977
5108
  )
4978
5109
  )
4979
5110
  } : {
4980
- resources: fs7.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path9.join(entry.parentPath, entry.name)).sort(),
5111
+ resources: fs7.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => path8.join(entry.parentPath, entry.name)).sort(),
4981
5112
  sourceRoot: input2
4982
5113
  }
4983
5114
  });
4984
5115
  }
4985
5116
  }
4986
5117
  }
4987
- const infoPlistFile = settings("INFOPLIST_FILE") ? path9.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
4988
- const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? path9.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
5118
+ const infoPlistFile = settings("INFOPLIST_FILE") ? path8.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
5119
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? path8.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
4989
5120
  const infoPlistPending = module.generatedInfoPlist && !options.prepareGeneratedSources;
4990
5121
  const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist2.default.parse(fs7.readFileSync(infoPlistFile, "utf8")) : {};
4991
5122
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
@@ -5050,7 +5181,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5050
5181
  };
5051
5182
  }
5052
5183
  const localPackageDirs = [
5053
- ...listed.filter((reference) => fs7.existsSync(path9.join(reference, "Package.swift"))),
5184
+ ...listed.filter((reference) => fs7.existsSync(path8.join(reference, "Package.swift"))),
5054
5185
  ...projects.flatMap(
5055
5186
  (project) => Object.entries(project.objects).flatMap(([id, entry]) => {
5056
5187
  if (!isDict(entry)) return [];
@@ -5060,19 +5191,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5060
5191
  const packages = [];
5061
5192
  while (pending.length > 0) {
5062
5193
  const dir = pending.pop();
5063
- if (fs7.existsSync(path9.join(dir, "Package.swift"))) {
5194
+ if (fs7.existsSync(path8.join(dir, "Package.swift"))) {
5064
5195
  packages.push(dir);
5065
5196
  continue;
5066
5197
  }
5067
5198
  if (!isDirectory(dir)) continue;
5068
5199
  for (const child of fs7.readdirSync(dir, { withFileTypes: true }))
5069
5200
  if (child.isDirectory() && !child.name.startsWith("."))
5070
- pending.push(path9.join(dir, child.name));
5201
+ pending.push(path8.join(dir, child.name));
5071
5202
  }
5072
5203
  return packages;
5073
5204
  }
5074
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path9.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
5075
- return candidate && fs7.existsSync(path9.join(candidate, "Package.swift")) ? [candidate] : [];
5205
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? path8.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
5206
+ return candidate && fs7.existsSync(path8.join(candidate, "Package.swift")) ? [candidate] : [];
5076
5207
  })
5077
5208
  )
5078
5209
  ];
@@ -5102,7 +5233,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5102
5233
  if ((flag === "-framework" || flag === "-weak_framework") && name)
5103
5234
  sdkFrameworks.add(name);
5104
5235
  });
5105
- const absolute = (raw) => path9.resolve(ref.project.projectDir, expand(raw, settings2));
5236
+ const absolute = (raw) => path8.resolve(ref.project.projectDir, expand(raw, settings2));
5106
5237
  const requested = options.nativeModules;
5107
5238
  const includeBinary = (name, dir) => {
5108
5239
  if (!requested || nativeTargets.has(ref) || requested.includes(name) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module2) => requested.includes(module2)))
@@ -5120,7 +5251,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5120
5251
  const name = /^(.+)\.framework$/.exec(entry.name)?.[1];
5121
5252
  if (!name || byProduct.has(entry.name) || searchedFrameworks.has(name))
5122
5253
  continue;
5123
- const file = path9.join(directory, entry.name);
5254
+ const file = path8.join(directory, entry.name);
5124
5255
  if (fs7.statSync(file, { throwIfNoEntry: false })?.isDirectory())
5125
5256
  searchedFrameworks.set(name, file);
5126
5257
  }
@@ -5129,7 +5260,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5129
5260
  }
5130
5261
  for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
5131
5262
  const dir = absolute(raw);
5132
- const modulemap = path9.join(dir, "module.modulemap");
5263
+ const modulemap = path8.join(dir, "module.modulemap");
5133
5264
  if (!fs7.existsSync(modulemap)) continue;
5134
5265
  const name = moduleMapName(fs7.readFileSync(modulemap, "utf8"));
5135
5266
  if (name && !binaryFrameworks.has(name)) includeBinary(name, dir);
@@ -5205,7 +5336,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5205
5336
  ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
5206
5337
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
5207
5338
  kind: "local",
5208
- dir: path9.resolve(
5339
+ dir: path8.resolve(
5209
5340
  project.projectDir,
5210
5341
  str(reference.relativePath) ?? ""
5211
5342
  )
@@ -5239,7 +5370,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5239
5370
  continue;
5240
5371
  }
5241
5372
  if (tree === "BUILT_PRODUCTS_DIR" || tree === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
5242
- byProduct.has(path9.basename(rawPath)))
5373
+ byProduct.has(path8.basename(rawPath)))
5243
5374
  continue;
5244
5375
  const resolved = fileId ? project.resolvePath(fileId) : null;
5245
5376
  if (fileId && resolved !== null && !fs7.existsSync(resolved)) {
@@ -5269,7 +5400,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5269
5400
  ({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
5270
5401
  );
5271
5402
  const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
5272
- let packageResolved = fs7.existsSync(resolvedFile) ? [fs7.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path9.join(dir, "Package.resolved")))].filter((file) => fs7.existsSync(file)).map((file) => fs7.realpathSync.native(file)).sort();
5403
+ let packageResolved = fs7.existsSync(resolvedFile) ? [fs7.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => path8.join(dir, "Package.resolved")))].filter((file) => fs7.existsSync(file)).map((file) => fs7.realpathSync.native(file)).sort();
5273
5404
  if (packageResolved.length === 0) {
5274
5405
  const requirements = remotePackageRequirements(projects);
5275
5406
  if (requirements.length > 0) {
@@ -5320,7 +5451,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5320
5451
  } : {},
5321
5452
  rootDir: commonAncestor(
5322
5453
  [
5323
- workspace ? path9.dirname(workspace) : app.project.projectDir,
5454
+ workspace ? path8.dirname(workspace) : app.project.projectDir,
5324
5455
  ...used.map((project) => project.projectDir),
5325
5456
  ...localPackageDirs,
5326
5457
  ...linkedProducts.flatMap(
@@ -5330,7 +5461,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5330
5461
  // a target's own files may sit beside the project, such as an asset
5331
5462
  // catalog one folder up, and xcode builds them from there
5332
5463
  ...new Set(
5333
- [...module.allSources, ...module.resources].filter((file) => fs7.existsSync(file)).map((file) => path9.dirname(file))
5464
+ [...module.allSources, ...module.resources].filter((file) => fs7.existsSync(file)).map((file) => path8.dirname(file))
5334
5465
  )
5335
5466
  ].map((dir) => fs7.realpathSync.native(dir))
5336
5467
  ),
@@ -5339,7 +5470,11 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5339
5470
  ...used.map((project) => project.projectFile),
5340
5471
  ...xcconfigs,
5341
5472
  ...entitlementsFile ? [entitlementsFile] : [],
5342
- ...cocoapods ? [cocoapods.podfileLock, cocoapods.manifestLock, ...cocoapods.localPodspecs] : []
5473
+ ...cocoapods ? [
5474
+ cocoapods.podfileLock,
5475
+ cocoapods.manifestLock,
5476
+ ...cocoapods.specificationFiles
5477
+ ] : []
5343
5478
  ])
5344
5479
  ].sort(),
5345
5480
  projectDirs: [...new Set(used.map((project) => project.projectDir))].sort(),
@@ -5372,16 +5507,16 @@ function nonEmptyString(value) {
5372
5507
  return typeof value === "string" && value.length > 0 ? value : void 0;
5373
5508
  }
5374
5509
  var SDK_BEFORE_SCENE_REQUIREMENT = "26.0";
5375
- function stampNativeBuildSdk(identity, buildSdkVersion = NATIVE_GRAPH_SDK_VERSION) {
5376
- const dtPlatformVersion = identity.dtPlatformVersion ?? selectNativeAppIdentityReader(identity.platform, {
5377
- ios: () => identity.sceneManifest ? buildSdkVersion : SDK_BEFORE_SCENE_REQUIREMENT,
5510
+ function stampNativeBuildSdk(identity2, buildSdkVersion = NATIVE_GRAPH_SDK_VERSION) {
5511
+ const dtPlatformVersion = identity2.dtPlatformVersion ?? selectNativeAppIdentityReader(identity2.platform, {
5512
+ ios: () => identity2.sceneManifest ? buildSdkVersion : SDK_BEFORE_SCENE_REQUIREMENT,
5378
5513
  android: () => buildSdkVersion
5379
5514
  })();
5380
5515
  return {
5381
- ...identity,
5516
+ ...identity2,
5382
5517
  dtPlatformVersion,
5383
5518
  infoPlistStrings: {
5384
- ...identity.infoPlistStrings,
5519
+ ...identity2.infoPlistStrings,
5385
5520
  DTPlatformVersion: dtPlatformVersion
5386
5521
  }
5387
5522
  };
@@ -5460,7 +5595,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5460
5595
  const rootModuleName = readRootModuleName(
5461
5596
  app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && fs8.existsSync(file)).map((file) => fs8.readFileSync(file, "utf8"))
5462
5597
  );
5463
- const identity = {
5598
+ const identity2 = {
5464
5599
  ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
5465
5600
  applicationName,
5466
5601
  ...applicationDisplayName ? { applicationDisplayName } : {},
@@ -5493,7 +5628,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5493
5628
  app.resources,
5494
5629
  (file) => fs8.readFileSync(file, "utf8"),
5495
5630
  (file) => {
5496
- const extension = path10.extname(file).toLowerCase();
5631
+ const extension = path9.extname(file).toLowerCase();
5497
5632
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
5498
5633
  return `data:${contentType};base64,${fs8.readFileSync(file).toString("base64")}`;
5499
5634
  },
@@ -5513,7 +5648,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
5513
5648
  backgroundModes,
5514
5649
  appIntentIdentifiers
5515
5650
  };
5516
- return stampNativeBuildSdk(identity, buildSdkVersion);
5651
+ return stampNativeBuildSdk(identity2, buildSdkVersion);
5517
5652
  }
5518
5653
  function readNativeAppIdentityFromProject(projectRoot, platform, parseInfoPlist = parsePlistSource, iosTarget, androidMergedManifest, environment, buildSdkVersion) {
5519
5654
  const read = selectNativeAppIdentityReader(platform, {
@@ -5532,7 +5667,7 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
5532
5667
  const read = selectNativeAppIdentityReader(platform, {
5533
5668
  android: () => null,
5534
5669
  ios: () => {
5535
- const nested = path10.join(projectRoot, "ios");
5670
+ const nested = path9.join(projectRoot, "ios");
5536
5671
  const iosRoot = fs8.existsSync(nested) ? nested : projectRoot;
5537
5672
  const prefix = iosRoot === nested ? "ios/" : "";
5538
5673
  const files = {};
@@ -5544,26 +5679,26 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
5544
5679
  "AppDelegate.swift",
5545
5680
  "AppDelegate.mm",
5546
5681
  "AppDelegate.m",
5547
- ...fs8.readdirSync(path10.join(iosRoot, entry.name)).filter((name) => name.endsWith(".entitlements"))
5682
+ ...fs8.readdirSync(path9.join(iosRoot, entry.name)).filter((name) => name.endsWith(".entitlements"))
5548
5683
  ];
5549
5684
  for (const name of names) {
5550
5685
  const relative2 = `${prefix}${entry.name}/${name}`;
5551
- const file = path10.join(projectRoot, relative2);
5686
+ const file = path9.join(projectRoot, relative2);
5552
5687
  if (fs8.existsSync(file)) files[relative2] = fs8.readFileSync(file, "utf8");
5553
5688
  }
5554
5689
  } else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
5555
5690
  const relative2 = `${prefix}${entry.name}`;
5556
- const file = path10.join(projectRoot, relative2);
5691
+ const file = path9.join(projectRoot, relative2);
5557
5692
  if (fs8.existsSync(file)) files[relative2] = fs8.readFileSync(file, "utf8");
5558
5693
  }
5559
5694
  }
5560
- const identity = extractNativeAppIdentityFromFiles(
5695
+ const identity2 = extractNativeAppIdentityFromFiles(
5561
5696
  files,
5562
5697
  "ios",
5563
5698
  parseInfoPlist,
5564
5699
  iosTarget
5565
5700
  );
5566
- return identity ? stampNativeBuildSdk(identity) : null;
5701
+ return identity2 ? stampNativeBuildSdk(identity2) : null;
5567
5702
  }
5568
5703
  });
5569
5704
  return read ? read() : null;
@@ -5571,23 +5706,23 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
5571
5706
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
5572
5707
  const files = {};
5573
5708
  if (androidMergedManifest) {
5574
- const file = path10.resolve(projectRoot, androidMergedManifest);
5709
+ const file = path9.resolve(projectRoot, androidMergedManifest);
5575
5710
  if (!fs8.existsSync(file)) return null;
5576
5711
  files[androidMergedManifest] = fs8.readFileSync(file, "utf8");
5577
5712
  } else {
5578
- const androidRoot = path10.join(projectRoot, "android");
5713
+ const androidRoot = path9.join(projectRoot, "android");
5579
5714
  if (!fs8.existsSync(androidRoot)) return null;
5580
5715
  const collect = (directory) => {
5581
5716
  for (const entry of fs8.readdirSync(directory, { withFileTypes: true })) {
5582
- const file = path10.join(directory, entry.name);
5717
+ const file = path9.join(directory, entry.name);
5583
5718
  if (entry.isDirectory()) collect(file);
5584
5719
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
5585
- files[path10.relative(projectRoot, file).split(path10.sep).join("/")] = fs8.readFileSync(file, "utf8");
5720
+ files[path9.relative(projectRoot, file).split(path9.sep).join("/")] = fs8.readFileSync(file, "utf8");
5586
5721
  }
5587
5722
  };
5588
5723
  for (const module of fs8.readdirSync(androidRoot, { withFileTypes: true })) {
5589
5724
  if (!module.isDirectory()) continue;
5590
- const outputs = path10.join(
5725
+ const outputs = path9.join(
5591
5726
  androidRoot,
5592
5727
  module.name,
5593
5728
  "build/intermediates/merged_manifests"
@@ -5598,14 +5733,14 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
5598
5733
  for (const manifest of Object.keys(files)) {
5599
5734
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
5600
5735
  if (!resourceDirectory) continue;
5601
- const absolute = path10.resolve(projectRoot, resourceDirectory);
5736
+ const absolute = path9.resolve(projectRoot, resourceDirectory);
5602
5737
  if (!fs8.existsSync(absolute)) continue;
5603
5738
  for (const entry of fs8.readdirSync(absolute, { withFileTypes: true })) {
5604
5739
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
5605
- for (const resource of fs8.readdirSync(path10.join(absolute, entry.name))) {
5740
+ for (const resource of fs8.readdirSync(path9.join(absolute, entry.name))) {
5606
5741
  if (!resource.endsWith(".xml")) continue;
5607
5742
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
5608
- files[file] = fs8.readFileSync(path10.resolve(projectRoot, file), "utf8");
5743
+ files[file] = fs8.readFileSync(path9.resolve(projectRoot, file), "utf8");
5609
5744
  }
5610
5745
  }
5611
5746
  }
@@ -5621,12 +5756,12 @@ function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
5621
5756
  function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, environment, buildSdkVersion) {
5622
5757
  const app = readIosAppTarget(projectRoot, iosTarget, environment);
5623
5758
  if (!app) return null;
5624
- const identity = readNativeAppIdentityFromXcodeTarget(
5759
+ const identity2 = readNativeAppIdentityFromXcodeTarget(
5625
5760
  app,
5626
5761
  parseInfoPlist,
5627
5762
  buildSdkVersion
5628
5763
  );
5629
- const projectManifestPath = path10.join(projectRoot, "package.json");
5764
+ const projectManifestPath = path9.join(projectRoot, "package.json");
5630
5765
  const projectRequire = createRequire(projectManifestPath);
5631
5766
  let reanimatedManifestPath;
5632
5767
  try {
@@ -5635,7 +5770,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
5635
5770
  );
5636
5771
  } catch (error) {
5637
5772
  if (error instanceof Error && "code" in error && error.code === "MODULE_NOT_FOUND") {
5638
- return identity;
5773
+ return identity2;
5639
5774
  }
5640
5775
  throw error;
5641
5776
  }
@@ -5644,11 +5779,11 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
5644
5779
  );
5645
5780
  const installedVersion = isRecord(installedManifest) ? nonEmptyString(installedManifest.version) : void 0;
5646
5781
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
5647
- if (Number.parseInt(installedVersion, 10) < 4) return identity;
5782
+ if (Number.parseInt(installedVersion, 10) < 4) return identity2;
5648
5783
  const defaults = JSON.parse(
5649
5784
  fs8.readFileSync(
5650
- path10.join(
5651
- path10.dirname(reanimatedManifestPath),
5785
+ path9.join(
5786
+ path9.dirname(reanimatedManifestPath),
5652
5787
  "src/featureFlags/staticFlags.json"
5653
5788
  ),
5654
5789
  "utf8"
@@ -5675,7 +5810,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
5675
5810
  "Reanimated animation backend requires settled React renders to be disabled"
5676
5811
  );
5677
5812
  }
5678
- return { ...identity, reanimatedStaticFeatureFlags: flags };
5813
+ return { ...identity2, reanimatedStaticFeatureFlags: flags };
5679
5814
  }
5680
5815
  function readIosAppTarget(projectRoot, iosTarget, environment) {
5681
5816
  const selected = selectIosAppTarget(projectRoot, iosTarget);