peachsim 0.1.2438 → 0.1.2439

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 (175) hide show
  1. package/README.md +30 -98
  2. package/cli/app-catalog.ts +4 -73
  3. package/cli/catalog/content.ts +1 -1
  4. package/cli/cloud-box-artifact.ts +26 -39
  5. package/cli/cloud-client.ts +69 -117
  6. package/cli/cloud-session.ts +2 -9
  7. package/cli/commands/box.ts +6 -6
  8. package/cli/commands/control.ts +4 -11
  9. package/cli/commands/flow.ts +5 -9
  10. package/cli/commands/kotlin.ts +2 -1
  11. package/cli/commands/platform.ts +21 -39
  12. package/cli/commands/record-three.ts +1 -1
  13. package/cli/commands/shell-url.ts +29 -23
  14. package/cli/dev-build-freshness.ts +4 -3
  15. package/cli/native-input.ts +2 -2
  16. package/cli/outbound-endpoints.ts +20 -45
  17. package/cli/remote-project-bundle.ts +8 -14
  18. package/cli/remote-simulators.ts +1 -1
  19. package/cli/send-to-box.ts +2 -1
  20. package/detox/jest-preset.cjs +1 -1
  21. package/detox/jest-transform.cjs +40 -2
  22. package/dist-lib/agent-daemon-client.cjs +34 -24
  23. package/dist-lib/agent-events.cjs +1 -1
  24. package/dist-lib/attached-projects.cjs +19 -17
  25. package/dist-lib/auth/shared-session.cjs +18 -16
  26. package/dist-lib/backend-origin.cjs +1 -1
  27. package/dist-lib/beta.cjs +1 -1
  28. package/dist-lib/beta.mjs +2 -1
  29. package/dist-lib/bridge-constants.cjs +1 -1
  30. package/dist-lib/bridge-contract-input.cjs +1 -1
  31. package/dist-lib/bridge-contract-input.mjs +20 -583
  32. package/dist-lib/bridge-contract.cjs +1 -1
  33. package/dist-lib/bridge-contract.mjs +17 -99
  34. package/dist-lib/bundle-channel.cjs +8718 -5552
  35. package/dist-lib/capture-contract.cjs +1 -1
  36. package/dist-lib/capture-contract.mjs +13 -363
  37. package/dist-lib/cloud-contract.cjs +1 -1
  38. package/dist-lib/cloud-contract.mjs +34 -155
  39. package/dist-lib/cloud-test-args.cjs +1 -1
  40. package/dist-lib/cloud-test-args.mjs +2 -1
  41. package/dist-lib/cloud.cjs +1 -1
  42. package/dist-lib/cloud.mjs +26 -155
  43. package/dist-lib/config.cjs +1 -4
  44. package/dist-lib/config.mjs +11 -30
  45. package/dist-lib/detox/index.cjs +2554 -230
  46. package/dist-lib/detox/jest-preset.cjs +1 -1
  47. package/dist-lib/detox/jest-transform.cjs +40 -2
  48. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  49. package/dist-lib/esm-chunks/acorn-FGE4PYDJ.mjs +50 -0
  50. package/dist-lib/esm-chunks/chunk-2EUHEBIJ.mjs +664 -0
  51. package/dist-lib/esm-chunks/chunk-2NPABFPN.mjs +5719 -0
  52. package/dist-lib/esm-chunks/chunk-4ZFNH7TU.mjs +10 -0
  53. package/dist-lib/esm-chunks/chunk-5T4XBUJP.mjs +1353 -0
  54. package/dist-lib/esm-chunks/chunk-6VY6HTJC.mjs +18951 -0
  55. package/dist-lib/esm-chunks/chunk-7HANEMO4.mjs +188 -0
  56. package/dist-lib/esm-chunks/chunk-C3WBGYP6.mjs +186 -0
  57. package/dist-lib/esm-chunks/chunk-CVGDRROP.mjs +57 -0
  58. package/dist-lib/esm-chunks/chunk-DADGQELM.mjs +375 -0
  59. package/dist-lib/esm-chunks/chunk-DEGYKHN7.mjs +12 -0
  60. package/dist-lib/esm-chunks/chunk-HIDNO3RP.mjs +10992 -0
  61. package/dist-lib/esm-chunks/chunk-HSADZOVN.mjs +30 -0
  62. package/dist-lib/esm-chunks/chunk-IWJUYJQO.mjs +42 -0
  63. package/dist-lib/esm-chunks/chunk-JCKI3VZ6.mjs +10 -0
  64. package/dist-lib/esm-chunks/chunk-KSQ5KM5Y.mjs +17 -0
  65. package/dist-lib/esm-chunks/chunk-KVTIDLBK.mjs +598 -0
  66. package/dist-lib/esm-chunks/chunk-MIQSRBVU.mjs +10 -0
  67. package/dist-lib/esm-chunks/chunk-YB27R6JG.mjs +115 -0
  68. package/dist-lib/esm-chunks/metro-layout-parser-MVUAXRUJ.mjs +58 -0
  69. package/dist-lib/expo-swift-bundle.cjs +7856 -4707
  70. package/dist-lib/expo-swift-metadata.cjs +1 -1
  71. package/dist-lib/expo-swift-metadata.mjs +16 -165
  72. package/dist-lib/home-paths.cjs +1 -1
  73. package/dist-lib/host/bridge-host.cjs +15658 -11404
  74. package/dist-lib/host/fetch-proxy-handler.cjs +3927 -342
  75. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  76. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -1
  77. package/dist-lib/host/replacement-module-handler.cjs +4 -4
  78. package/dist-lib/host/websocket-proxy.cjs +1 -1
  79. package/dist-lib/index.cjs +9145 -32150
  80. package/dist-lib/jump-to-source-babel.cjs +1 -1
  81. package/dist-lib/jump-to-source-native.cjs +2 -2
  82. package/dist-lib/kotlin-host.cjs +260 -253
  83. package/dist-lib/menu.cjs +1 -1
  84. package/dist-lib/menu.mjs +5 -13
  85. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  86. package/dist-lib/metro-fingerprint-registry.mjs +5 -6
  87. package/dist-lib/metro-production-bundle.cjs +22 -3
  88. package/dist-lib/metro-production-bundle.mjs +26 -92
  89. package/dist-lib/native-app-identity-project.cjs +663 -451
  90. package/dist-lib/native-app-identity-project.mjs +509 -2318
  91. package/dist-lib/native-app-identity.cjs +1 -1
  92. package/dist-lib/native-app-identity.mjs +27 -1340
  93. package/dist-lib/native-firebase-metadata.cjs +1 -1
  94. package/dist-lib/native-firebase-metadata.mjs +5 -18
  95. package/dist-lib/pdfium-raster.cjs +1 -1
  96. package/dist-lib/pdfium-raster.mjs +2 -1
  97. package/dist-lib/plist.cjs +2 -2
  98. package/dist-lib/plist.mjs +5 -7
  99. package/dist-lib/profiles.cjs +2 -1
  100. package/dist-lib/public-brand.cjs +1 -1
  101. package/dist-lib/public-origins-lib-esm.json +246 -187
  102. package/dist-lib/public-origins-lib-static.json +1 -1
  103. package/dist-lib/public-origins-lib.json +1059 -1238
  104. package/dist-lib/react-native-host-modules.cjs +1 -1
  105. package/dist-lib/react-native-host-modules.mjs +2 -1
  106. package/dist-lib/reap-browser.cjs +18 -7
  107. package/dist-lib/scripts/dev-server-scanner.cjs +6 -230
  108. package/dist-lib/sdk.cjs +1 -1
  109. package/dist-lib/sdk.mjs +22 -78
  110. package/dist-lib/skills.cjs +21657 -17374
  111. package/dist-lib/swift-compile.cjs +1343 -1318
  112. package/dist-lib/swift-compile.mjs +68 -19013
  113. package/dist-lib/swift-package.cjs +1 -1
  114. package/dist-lib/swift-package.mjs +35 -630
  115. package/dist-lib/swift-submit.cjs +1 -1
  116. package/dist-lib/swift-submit.mjs +9 -24
  117. package/dist-lib/swift-toolchain.cjs +1 -1
  118. package/dist-lib/swift.cjs +1 -1
  119. package/dist-lib/vendor/@peculiar/x509.cjs +18061 -0
  120. package/dist-lib/vendor/acorn.cjs +5699 -0
  121. package/dist-lib/vendor/bplist-parser.cjs +1589 -0
  122. package/dist-lib/vendor/ignore.cjs +455 -0
  123. package/dist-lib/vendor/magic-string.cjs +1693 -0
  124. package/dist-lib/vendor/plist.cjs +10978 -0
  125. package/dist-lib/vendor/smol-toml.cjs +768 -0
  126. package/dist-lib/vendor/stream-json.cjs +1997 -0
  127. package/dist-lib/vendor/sucrase/dist/index.js.cjs +23593 -0
  128. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +15750 -0
  129. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +11316 -0
  130. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +482 -0
  131. package/dist-lib/vendor/sucrase.cjs +23593 -0
  132. package/dist-lib/vendor/terser.cjs +36874 -0
  133. package/dist-lib/vendor/valibot.cjs +6253 -0
  134. package/dist-lib/vendor/zod.cjs +23262 -0
  135. package/dist-lib/worklet-executable.cjs +3 -3
  136. package/dist-lib/worklet-executable.mjs +11 -16
  137. package/dist-types/packages/peach-engine/src/config.d.ts +1 -1
  138. package/kotlin/fork/NOTICE +3 -0
  139. package/kotlin/sdk.tar.gz +0 -0
  140. package/kotlin/toolchain.json +6 -6
  141. package/package.json +17 -121
  142. package/runtime-companion.json +1 -1
  143. package/scripts/dev-server-scanner.ts +13 -223
  144. package/src/android-autolinking.ts +2 -2
  145. package/src/bundle-channel.mjs +3 -15
  146. package/src/cloud-contract.ts +3 -4
  147. package/src/config.ts +0 -5
  148. package/src/host/bridge-host.ts +19 -1
  149. package/src/host/server-scan-handler.ts +1 -9
  150. package/src/index.ts +0 -2
  151. package/src/kotlin-host.ts +1 -2
  152. package/src/kotlinDiscoveryContract.ts +1 -0
  153. package/src/metro-production-bundle.ts +28 -6
  154. package/src/native-seam-manifest.ts +0 -13
  155. package/src/one-native-app-catalog.ts +8 -27
  156. package/src/one-native-app-config.ts +95 -0
  157. package/src/one-native-source.ts +250 -0
  158. package/src/one-widget-metadata.ts +45 -126
  159. package/src/oneWidgetContract.ts +80 -117
  160. package/src/serverDiscoveryContract.ts +0 -1
  161. package/src/simulator-route.ts +8 -0
  162. package/src/vite-plugin.ts +2 -2
  163. package/src/xcode-project.ts +1 -1
  164. package/dist-lib/metro.cjs +0 -27984
  165. package/dist-lib/vite-swift.cjs +0 -43376
  166. package/dist-lib/vite.cjs +0 -21456
  167. package/src/androidAutolinkingContract.ts +0 -48
  168. package/src/androidRootModuleContract.ts +0 -39
  169. package/src/dev-server-open.ts +0 -92
  170. package/src/metro-plugin.ts +0 -578
  171. package/src/one-widget-discovery.ts +0 -23
  172. package/src/swift-vite-lifetime.ts +0 -42
  173. package/src/vite-plugin-one.ts +0 -746
  174. package/src/vite-plugin-swift.ts +0 -225
  175. package/src/vite.d.ts +0 -10
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2438 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2439 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  let __sootsim_import_meta_url = '', __sootsim_import_meta_dirname = '', __sootsim_import_meta_filename = ''; try { __sootsim_import_meta_url = require('url').pathToFileURL(__filename).href; __sootsim_import_meta_dirname = __dirname; __sootsim_import_meta_filename = __filename; } catch {}
3
3
  "use strict";
4
4
  var __create = Object.create;
@@ -1154,9 +1154,9 @@ __export(native_app_identity_project_exports, {
1154
1154
  readNativeAppIdentityFromXcodeTarget: () => readNativeAppIdentityFromXcodeTarget
1155
1155
  });
1156
1156
  module.exports = __toCommonJS(native_app_identity_project_exports);
1157
- var import_node_fs5 = __toESM(require("node:fs"), 1);
1157
+ var import_node_fs44 = __toESM(require("node:fs"), 1);
1158
1158
  var import_node_module = require("node:module");
1159
- var import_node_path8 = __toESM(require("node:path"), 1);
1159
+ var import_node_path46 = __toESM(require("node:path"), 1);
1160
1160
 
1161
1161
  // src/android-string-value.ts
1162
1162
  function compileAndroidStringValue(text2, where) {
@@ -1566,7 +1566,7 @@ function groupParentsOf(objects) {
1566
1566
  groupParents.set(objects, parents);
1567
1567
  return parents;
1568
1568
  }
1569
- function xcodePathResolver(objects, projectDir, join, sourceTreeRoot) {
1569
+ function xcodePathResolver(objects, projectDir, join8, sourceTreeRoot) {
1570
1570
  const parents = groupParentsOf(objects);
1571
1571
  const paths = /* @__PURE__ */ new Map();
1572
1572
  const resolve = (id) => {
@@ -1578,14 +1578,14 @@ function xcodePathResolver(objects, projectDir, join, sourceTreeRoot) {
1578
1578
  const own = str(entry.path) ?? "";
1579
1579
  const tree = str(entry.sourceTree) ?? "<group>";
1580
1580
  if (tree === "<absolute>") result = own;
1581
- else if (tree === "SOURCE_ROOT") result = join(projectDir, own);
1581
+ else if (tree === "SOURCE_ROOT") result = join8(projectDir, own);
1582
1582
  else if (tree === "<group>") {
1583
1583
  const parent = parents.get(id);
1584
1584
  const base = parent ? resolve(parent) : projectDir;
1585
- if (base !== null) result = join(base, own);
1585
+ if (base !== null) result = join8(base, own);
1586
1586
  } else {
1587
1587
  const base = sourceTreeRoot?.(tree);
1588
- if (base) result = join(base, own);
1588
+ if (base) result = join8(base, own);
1589
1589
  }
1590
1590
  }
1591
1591
  paths.set(id, result);
@@ -1607,7 +1607,7 @@ function xcodeTargetMemberVisitor(objects) {
1607
1607
  if (isDict(group) && group.isa === "PBXFileSystemSynchronizedRootGroup")
1608
1608
  synchronizedGroups.push({ id, group });
1609
1609
  }
1610
- return (targetId, resolvePath, filesUnder, join, visit) => {
1610
+ return (targetId, resolvePath, filesUnder, join8, visit) => {
1611
1611
  const target = objects[targetId];
1612
1612
  if (!isDict(target)) return;
1613
1613
  for (const phaseId of list(target.buildPhases)) {
@@ -1651,23 +1651,23 @@ function xcodeTargetMemberVisitor(objects) {
1651
1651
  for (const exceptionId of list(group.exceptions)) {
1652
1652
  const exception = objects[exceptionId];
1653
1653
  if (!isDict(exception) || exception.target !== targetId) continue;
1654
- for (const relative of list(exception.membershipExceptions))
1655
- exceptions.add(relative);
1654
+ for (const relative2 of list(exception.membershipExceptions))
1655
+ exceptions.add(relative2);
1656
1656
  }
1657
- const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative) => filesUnder(join(folder, relative)));
1657
+ const members = owned.has(groupId) ? filesUnder(folder) : [...exceptions].flatMap((relative2) => filesUnder(join8(folder, relative2)));
1658
1658
  for (const file of members) {
1659
- const relative = file.slice(prefix.length);
1659
+ const relative2 = file.slice(prefix.length);
1660
1660
  const excepted = [...exceptions].some(
1661
- (exception) => relative === exception || relative.startsWith(`${exception}/`)
1661
+ (exception) => relative2 === exception || relative2.startsWith(`${exception}/`)
1662
1662
  );
1663
- if (owned.has(groupId) === excepted || NEVER_MEMBER.test(relative)) continue;
1663
+ if (owned.has(groupId) === excepted || NEVER_MEMBER.test(relative2)) continue;
1664
1664
  if (file.endsWith(".swift")) {
1665
- if (!relative.split("/").some((segment) => BUNDLE_DIR.test(segment)))
1665
+ if (!relative2.split("/").some((segment) => BUNDLE_DIR.test(segment)))
1666
1666
  visit(file, "source");
1667
1667
  } else if (/\.(h|hh|hpp|hxx|pch)$/.test(file)) {
1668
1668
  visit(
1669
1669
  file,
1670
- relative.split("/").some((segment) => BUNDLE_DIR.test(segment)) ? "resource" : "header"
1670
+ relative2.split("/").some((segment) => BUNDLE_DIR.test(segment)) ? "resource" : "header"
1671
1671
  );
1672
1672
  } else if (/\.(m|mm|c|cc|cpp|cxx|metal)$/.test(file)) {
1673
1673
  visit(file, "source");
@@ -1809,10 +1809,10 @@ function appTargetReleaseSettings(pbxproj, targetName, infoPlistRelativePath) {
1809
1809
  var APP_DELEGATE_PATH_RE = /(?:^|\/)(?:ios\/)?([^/]+)\/AppDelegate\.(?:swift|mm|m)$/;
1810
1810
  function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri) {
1811
1811
  const pbxprojPath = Object.keys(files).find(
1812
- (path9) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path9)
1812
+ (path41) => /(?:^|\/)ios\/[^/]+\.xcodeproj\/project\.pbxproj$/.test(path41)
1813
1813
  ) ?? Object.keys(files).find(
1814
- (path9) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path9)
1815
- ) ?? Object.keys(files).find((path9) => /(?:^|\/)project\.pbxproj$/.test(path9));
1814
+ (path41) => /(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/.test(path41)
1815
+ ) ?? Object.keys(files).find((path41) => /(?:^|\/)project\.pbxproj$/.test(path41));
1816
1816
  if (!pbxprojPath) return null;
1817
1817
  const pbxproj = files[pbxprojPath];
1818
1818
  let objects = {};
@@ -1854,7 +1854,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
1854
1854
  } else if (applicationTargetNames.size === 1) {
1855
1855
  targetName = [...applicationTargetNames][0];
1856
1856
  } else if (applicationTargetNames.size > 1) {
1857
- const delegateTargets = Object.keys(files).filter((path9) => !path9.includes("/Pods/")).map((path9) => path9.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
1857
+ const delegateTargets = Object.keys(files).filter((path41) => !path41.includes("/Pods/")).map((path41) => path41.match(APP_DELEGATE_PATH_RE)?.[1]).filter(
1858
1858
  (name) => typeof name === "string" && applicationTargetNames.has(name)
1859
1859
  );
1860
1860
  if (delegateTargets.length === 1) {
@@ -2070,7 +2070,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2070
2070
  if (resourceUri) {
2071
2071
  if (!selectedTarget)
2072
2072
  throw new Error("native app icon target membership is unresolved");
2073
- const join = (base, own) => {
2073
+ const join8 = (base, own) => {
2074
2074
  const segments = [];
2075
2075
  for (const segment of `${base}/${own}`.split("/")) {
2076
2076
  if (segment === "" || segment === ".") continue;
@@ -2083,22 +2083,22 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2083
2083
  const project = Object.values(objects).find(
2084
2084
  (object3) => isRecord(object3) && object3.isa === "PBXProject"
2085
2085
  );
2086
- const projectDir = join(
2086
+ const projectDir = join8(
2087
2087
  pbxprojPath.replace(/(?:^|\/)[^/]+\.xcodeproj\/project\.pbxproj$/, ""),
2088
2088
  isRecord(project) && typeof project.projectDirPath === "string" ? project.projectDirPath : ""
2089
2089
  );
2090
2090
  const paths = Object.keys(files);
2091
2091
  xcodeTargetMemberVisitor(objects)(
2092
2092
  selectedTarget.id,
2093
- xcodePathResolver(objects, projectDir, join),
2093
+ xcodePathResolver(objects, projectDir, join8),
2094
2094
  (file) => {
2095
2095
  if (Object.hasOwn(files, file)) return [file];
2096
2096
  const prefix = file === "" ? "" : `${file.replace(/\/$/, "")}/`;
2097
2097
  return paths.filter(
2098
- (path9) => path9.startsWith(prefix) && !/(?:^|\/)\./.test(path9.slice(prefix.length))
2098
+ (path41) => path41.startsWith(prefix) && !/(?:^|\/)\./.test(path41.slice(prefix.length))
2099
2099
  );
2100
2100
  },
2101
- join,
2101
+ join8,
2102
2102
  (file, kind) => {
2103
2103
  if (kind === "resource") resources.add(file);
2104
2104
  }
@@ -2106,7 +2106,7 @@ function nativeAppIdentityFromIos(files, parseInfoPlist, iosTarget, resourceUri)
2106
2106
  }
2107
2107
  const rootModuleName = readRootModuleName(
2108
2108
  Object.entries(files).filter(
2109
- ([path9]) => !path9.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path9) || path9.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
2109
+ ([path41]) => !path41.includes("/Pods/") && (/(?:^|\/)(?:ios\/)?AppDelegate\.(?:swift|mm|m)$/.test(path41) || path41.match(APP_DELEGATE_PATH_RE)?.[1] === targetName)
2110
2110
  ).map(([, source]) => source)
2111
2111
  );
2112
2112
  return {
@@ -2199,15 +2199,40 @@ function extractNativeAppIdentityFromFiles(files, platform, parseInfoPlist, iosT
2199
2199
  }
2200
2200
 
2201
2201
  // src/plist.ts
2202
- var import_plist = __toESM(require("plist"), 1);
2202
+ var import_plist = __toESM(require("peachsim/vendor/plist"), 1);
2203
2203
  function parsePlistSource(source) {
2204
2204
  return import_plist.default.parse(source);
2205
2205
  }
2206
2206
 
2207
2207
  // src/swift-objc-standin.ts
2208
+ var import_node_child_process3 = require("node:child_process");
2209
+ var import_node_crypto3 = require("node:crypto");
2210
+ var import_node_fs5 = __toESM(require("node:fs"), 1);
2211
+ var import_node_path7 = __toESM(require("node:path"), 1);
2212
+
2213
+ // src/case-insensitive-header-overlay.ts
2208
2214
  var import_node_crypto = require("node:crypto");
2215
+ var import_node_fs2 = __toESM(require("node:fs"), 1);
2216
+ var import_node_path2 = __toESM(require("node:path"), 1);
2217
+
2218
+ // src/write-build-file.ts
2219
+ var import_node_fs = require("node:fs");
2220
+ var import_node_path = __toESM(require("node:path"), 1);
2221
+
2222
+ // src/swift-objc-platform.ts
2223
+ var import_node_child_process2 = require("node:child_process");
2224
+ var import_node_path4 = __toESM(require("node:path"), 1);
2209
2225
 
2210
2226
  // src/swift-toolchain.ts
2227
+ var import_node_child_process = require("node:child_process");
2228
+ var import_node_crypto2 = require("node:crypto");
2229
+ var import_node_fs3 = __toESM(require("node:fs"), 1);
2230
+ var import_node_os = __toESM(require("node:os"), 1);
2231
+ var import_node_path3 = __toESM(require("node:path"), 1);
2232
+ var import_promises = require("node:stream/promises");
2233
+ var import_node_url = require("node:url");
2234
+ var import_node_util = require("node:util");
2235
+ var import_node_zlib = __toESM(require("node:zlib"), 1);
2211
2236
  var SWIFT_HOST_COMPILER_RELEASE = "swift-6.4.0-RELEASE-custom-81b2c791c27276bf";
2212
2237
  var SWIFT_HOST_COMPILER_ID = "81b2c791c27276bf";
2213
2238
  var compilerArchives = {
@@ -2285,6 +2310,13 @@ var compilerArchives = {
2285
2310
  }
2286
2311
  };
2287
2312
 
2313
+ // src/swift-objc-sdk.ts
2314
+ var import_node_path6 = __toESM(require("node:path"), 1);
2315
+
2316
+ // src/swift-objc-sdk-tree.ts
2317
+ var import_node_fs4 = require("node:fs");
2318
+ var import_node_path5 = __toESM(require("node:path"), 1);
2319
+
2288
2320
  // src/swift-objc-sdk.ts
2289
2321
  var IOS_SDK_TARGET = "arm64-apple-ios16.0-simulator";
2290
2322
 
@@ -2343,22 +2375,22 @@ var NATIVE_GRAPH_INPUTS = {
2343
2375
  compiler: "Apple Swift version 6.4 (swiftlang-6.4.0.34.1 clang-2100.3.34.1)",
2344
2376
  target: IOS_SDK_TARGET
2345
2377
  };
2346
- var NATIVE_GRAPH_ID = (0, import_node_crypto.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
2378
+ var NATIVE_GRAPH_ID = (0, import_node_crypto3.createHash)("sha256").update(JSON.stringify(NATIVE_GRAPH_INPUTS)).digest("hex");
2347
2379
 
2348
2380
  // src/xcode-project.ts
2349
- var import_node_child_process5 = require("node:child_process");
2350
- var import_node_crypto4 = require("node:crypto");
2351
- var import_node_fs4 = __toESM(require("node:fs"), 1);
2352
- var import_node_path7 = __toESM(require("node:path"), 1);
2353
- var import_plist3 = __toESM(require("plist"), 1);
2381
+ var import_node_child_process24 = require("node:child_process");
2382
+ var import_node_crypto26 = require("node:crypto");
2383
+ var import_node_fs43 = __toESM(require("node:fs"), 1);
2384
+ var import_node_path45 = __toESM(require("node:path"), 1);
2385
+ var import_plist3 = __toESM(require("peachsim/vendor/plist"), 1);
2354
2386
 
2355
2387
  // src/bazel-project.ts
2356
- var import_node_child_process = require("node:child_process");
2357
- var import_node_crypto2 = require("node:crypto");
2358
- var import_node_fs = __toESM(require("node:fs"), 1);
2359
- var import_node_os = __toESM(require("node:os"), 1);
2360
- var import_node_path = __toESM(require("node:path"), 1);
2361
- var import_plist2 = __toESM(require("plist"), 1);
2388
+ var import_node_child_process4 = require("node:child_process");
2389
+ var import_node_crypto4 = require("node:crypto");
2390
+ var import_node_fs6 = __toESM(require("node:fs"), 1);
2391
+ var import_node_os2 = __toESM(require("node:os"), 1);
2392
+ var import_node_path8 = __toESM(require("node:path"), 1);
2393
+ var import_plist2 = __toESM(require("peachsim/vendor/plist"), 1);
2362
2394
  var LIBRARY_RULES = /* @__PURE__ */ new Set(["swift_library", "objc_library", "cc_library"]);
2363
2395
  var QUERIED_RULES = [
2364
2396
  "swift_library",
@@ -2375,43 +2407,43 @@ var QUERIED_RULES = [
2375
2407
  ];
2376
2408
  var NATIVE_SOURCE = /\.(?:m|mm|c|cc|cpp|cxx|S)$/;
2377
2409
  var HEADER = /\.(?:h|hh|hpp|hxx|inc|inl|ipp)$/;
2378
- var PRODUCTS = import_node_path.default.join(".build", "peach-bazel", "Products");
2410
+ var PRODUCTS = import_node_path8.default.join(".build", "peach-bazel", "Products");
2379
2411
  function isBazelPackage(input) {
2380
- return /^BUILD(?:\.bazel)?$/.test(import_node_path.default.basename(input)) && import_node_fs.default.statSync(input).isFile();
2412
+ return /^BUILD(?:\.bazel)?$/.test(import_node_path8.default.basename(input)) && import_node_fs6.default.statSync(input).isFile();
2381
2413
  }
2382
2414
  function workspaceRoot(buildFile) {
2383
- for (let dir = import_node_path.default.dirname(buildFile); ; dir = import_node_path.default.dirname(dir)) {
2415
+ for (let dir = import_node_path8.default.dirname(buildFile); ; dir = import_node_path8.default.dirname(dir)) {
2384
2416
  if (["MODULE.bazel", "WORKSPACE", "WORKSPACE.bazel"].some(
2385
- (name) => import_node_fs.default.existsSync(import_node_path.default.join(dir, name))
2417
+ (name) => import_node_fs6.default.existsSync(import_node_path8.default.join(dir, name))
2386
2418
  ))
2387
2419
  return dir;
2388
- if (import_node_path.default.dirname(dir) === dir)
2420
+ if (import_node_path8.default.dirname(dir) === dir)
2389
2421
  throw new Error(`${buildFile} is not inside a bazel workspace`);
2390
2422
  }
2391
2423
  }
2392
2424
  function bazelBinary(root) {
2393
- const pinned = import_node_path.default.join(root, ".bazelversion");
2394
- if (!import_node_fs.default.existsSync(pinned)) return "bazel";
2395
- const version = import_node_fs.default.readFileSync(pinned, "utf8").trim();
2396
- const platform = import_node_os.default.platform() === "darwin" ? "darwin" : "linux";
2397
- const arch = import_node_os.default.arch() === "arm64" ? "arm64" : "x86_64";
2425
+ const pinned = import_node_path8.default.join(root, ".bazelversion");
2426
+ if (!import_node_fs6.default.existsSync(pinned)) return "bazel";
2427
+ const version = import_node_fs6.default.readFileSync(pinned, "utf8").trim();
2428
+ const platform = import_node_os2.default.platform() === "darwin" ? "darwin" : "linux";
2429
+ const arch = import_node_os2.default.arch() === "arm64" ? "arm64" : "x86_64";
2398
2430
  const name = `bazel-${version}-${platform}-${arch}`;
2399
- const binary = import_node_path.default.join(import_node_os.default.homedir(), ".peach", "cache", "bazel", name);
2400
- if (import_node_fs.default.existsSync(binary)) return binary;
2431
+ const binary = import_node_path8.default.join(import_node_os2.default.homedir(), ".peach", "cache", "bazel", name);
2432
+ if (import_node_fs6.default.existsSync(binary)) return binary;
2401
2433
  const url = `https://github.com/bazelbuild/bazel/releases/download/${version}/${name}`;
2402
- import_node_fs.default.mkdirSync(import_node_path.default.dirname(binary), { recursive: true });
2434
+ import_node_fs6.default.mkdirSync(import_node_path8.default.dirname(binary), { recursive: true });
2403
2435
  const partial = `${binary}.${process.pid}.partial`;
2404
- (0, import_node_child_process.execFileSync)("curl", ["-fsSL", "-o", partial, url]);
2405
- const expected = (0, import_node_child_process.execFileSync)("curl", ["-fsSL", `${url}.sha256`], {
2436
+ (0, import_node_child_process4.execFileSync)("curl", ["-fsSL", "-o", partial, url]);
2437
+ const expected = (0, import_node_child_process4.execFileSync)("curl", ["-fsSL", `${url}.sha256`], {
2406
2438
  encoding: "utf8"
2407
2439
  }).split(/\s/)[0];
2408
- const actual = (0, import_node_crypto2.createHash)("sha256").update(import_node_fs.default.readFileSync(partial)).digest("hex");
2440
+ const actual = (0, import_node_crypto4.createHash)("sha256").update(import_node_fs6.default.readFileSync(partial)).digest("hex");
2409
2441
  if (actual !== expected) {
2410
- import_node_fs.default.rmSync(partial, { force: true });
2442
+ import_node_fs6.default.rmSync(partial, { force: true });
2411
2443
  throw new Error(`${url} digest ${actual} differs from its release ${expected}`);
2412
2444
  }
2413
- import_node_fs.default.chmodSync(partial, 493);
2414
- import_node_fs.default.renameSync(partial, binary);
2445
+ import_node_fs6.default.chmodSync(partial, 493);
2446
+ import_node_fs6.default.renameSync(partial, binary);
2415
2447
  return binary;
2416
2448
  }
2417
2449
  function parseRule(raw) {
@@ -2435,22 +2467,22 @@ function parseRule(raw) {
2435
2467
  };
2436
2468
  }
2437
2469
  function graphInputsDigest(root) {
2438
- const hash = (0, import_node_crypto2.createHash)("sha256");
2470
+ const hash = (0, import_node_crypto4.createHash)("sha256");
2439
2471
  const visit = (dir) => {
2440
- for (const entry of import_node_fs.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
2472
+ for (const entry of import_node_fs6.default.readdirSync(dir, { withFileTypes: true }).sort((a, b) => a.name.localeCompare(b.name))) {
2441
2473
  if (entry.name.startsWith(".") || entry.name.startsWith("bazel-")) continue;
2442
- const full = import_node_path.default.join(dir, entry.name);
2474
+ const full = import_node_path8.default.join(dir, entry.name);
2443
2475
  if (entry.isDirectory()) visit(full);
2444
2476
  else if (/^(?:BUILD(?:\.bazel)?|MODULE\.bazel(?:\.lock)?|WORKSPACE(?:\.bazel)?|\.bazelrc|\.bazelversion)$/.test(
2445
2477
  entry.name
2446
2478
  ) || entry.name.endsWith(".bzl"))
2447
- hash.update(import_node_path.default.relative(root, full)).update("\0").update(import_node_fs.default.readFileSync(full));
2479
+ hash.update(import_node_path8.default.relative(root, full)).update("\0").update(import_node_fs6.default.readFileSync(full));
2448
2480
  }
2449
2481
  };
2450
2482
  visit(root);
2451
2483
  for (const file of [".bazelrc", ".bazelversion"])
2452
- if (import_node_fs.default.existsSync(import_node_path.default.join(root, file)))
2453
- hash.update(file).update(import_node_fs.default.readFileSync(import_node_path.default.join(root, file)));
2484
+ if (import_node_fs6.default.existsSync(import_node_path8.default.join(root, file)))
2485
+ hash.update(file).update(import_node_fs6.default.readFileSync(import_node_path8.default.join(root, file)));
2454
2486
  return hash.digest("hex");
2455
2487
  }
2456
2488
  var graphs = /* @__PURE__ */ new Map();
@@ -2470,16 +2502,16 @@ function bazelGraph(root, label, configuration) {
2470
2502
  const cached = graphs.get(key);
2471
2503
  if (cached) return cached;
2472
2504
  const flags = configurationFlags(configuration);
2473
- const digest = (0, import_node_crypto2.createHash)("sha256").update(JSON.stringify([GRAPH_FORMAT, label, flags, QUERIED_RULES])).update(graphInputsDigest(root)).digest("hex").slice(0, 24);
2474
- const file = import_node_path.default.join(root, ".build", "peach-bazel", `graph-${digest}.json`);
2505
+ const digest = (0, import_node_crypto4.createHash)("sha256").update(JSON.stringify([GRAPH_FORMAT, label, flags, QUERIED_RULES])).update(graphInputsDigest(root)).digest("hex").slice(0, 24);
2506
+ const file = import_node_path8.default.join(root, ".build", "peach-bazel", `graph-${digest}.json`);
2475
2507
  const bazel = bazelBinary(root);
2476
- const run2 = (args) => (0, import_node_child_process.execFileSync)(bazel, args, {
2508
+ const run2 = (args) => (0, import_node_child_process4.execFileSync)(bazel, args, {
2477
2509
  cwd: root,
2478
2510
  encoding: "utf8",
2479
2511
  maxBuffer: 1 << 30,
2480
2512
  stdio: ["ignore", "pipe", "pipe"]
2481
2513
  });
2482
- if (!import_node_fs.default.existsSync(file)) {
2514
+ if (!import_node_fs6.default.existsSync(file)) {
2483
2515
  const application = run2(["query", label, "--output=streamed_jsonproto"]);
2484
2516
  const app2 = parseRule({ target: JSON.parse(application.trim().split("\n")[0]) });
2485
2517
  if (!app2?.ruleClass.endsWith("_application"))
@@ -2503,8 +2535,8 @@ function bazelGraph(root, label, configuration) {
2503
2535
  const info2 = run2(["info", "output_base", "execution_root"]);
2504
2536
  const bin = run2(["cquery", deps[0], ...flags, "--output=files"]).split("\n").find((line) => line.includes("/bin/"));
2505
2537
  if (!bin) throw new Error(`bazel cquery names no output for ${deps[0]}`);
2506
- import_node_fs.default.mkdirSync(import_node_path.default.dirname(file), { recursive: true });
2507
- import_node_fs.default.writeFileSync(
2538
+ import_node_fs6.default.mkdirSync(import_node_path8.default.dirname(file), { recursive: true });
2539
+ import_node_fs6.default.writeFileSync(
2508
2540
  `${file}.partial`,
2509
2541
  JSON.stringify({
2510
2542
  application,
@@ -2514,9 +2546,9 @@ function bazelGraph(root, label, configuration) {
2514
2546
  bin: bin.slice(0, bin.indexOf("/bin/") + 4)
2515
2547
  })
2516
2548
  );
2517
- import_node_fs.default.renameSync(`${file}.partial`, file);
2549
+ import_node_fs6.default.renameSync(`${file}.partial`, file);
2518
2550
  }
2519
- const stored = JSON.parse(import_node_fs.default.readFileSync(file, "utf8"));
2551
+ const stored = JSON.parse(import_node_fs6.default.readFileSync(file, "utf8"));
2520
2552
  if (!isRecord(stored) || typeof stored.application !== "string" || typeof stored.cquery !== "string" || typeof stored.defaults !== "string" || typeof stored.info !== "string" || typeof stored.bin !== "string")
2521
2553
  throw new Error(`${file} is not a bazel graph`);
2522
2554
  const app = parseRule({
@@ -2557,8 +2589,8 @@ function bazelGraph(root, label, configuration) {
2557
2589
  app,
2558
2590
  appDeps,
2559
2591
  outputBase: info.output_base ?? "",
2560
- outputs: import_node_path.default.join(info.execution_root ?? "", stored.bin),
2561
- bin: import_node_path.default.join(root, ".build", "peach-bazel", "bin"),
2592
+ outputs: import_node_path8.default.join(info.execution_root ?? "", stored.bin),
2593
+ bin: import_node_path8.default.join(root, ".build", "peach-bazel", "bin"),
2562
2594
  minimumOS: app.attrs.get("minimum_os_version")?.value || null
2563
2595
  };
2564
2596
  graphs.set(key, graph);
@@ -2586,25 +2618,25 @@ var BazelFiles = class {
2586
2618
  generated = /* @__PURE__ */ new Set();
2587
2619
  repoDir(repo) {
2588
2620
  if (repo === "") return this.root;
2589
- const external = import_node_path.default.join(this.graph.outputBase, "external");
2621
+ const external = import_node_path8.default.join(this.graph.outputBase, "external");
2590
2622
  for (const name of [repo, `${repo}+`])
2591
- if (import_node_fs.default.existsSync(import_node_path.default.join(external, name))) return import_node_path.default.join(external, name);
2623
+ if (import_node_fs6.default.existsSync(import_node_path8.default.join(external, name))) return import_node_path8.default.join(external, name);
2592
2624
  throw new Error(`bazel external repository ${repo} is not fetched`);
2593
2625
  }
2594
2626
  /** the package directory in the source tree, or under bazel-bin for outputs. */
2595
2627
  packageDirs(label) {
2596
2628
  const { repo, pkg } = splitLabel(label);
2597
- const source = import_node_path.default.join(this.repoDir(repo), pkg);
2598
- const bin = repo ? import_node_path.default.join(this.graph.bin, "external", import_node_path.default.basename(this.repoDir(repo)), pkg) : import_node_path.default.join(this.graph.bin, pkg);
2629
+ const source = import_node_path8.default.join(this.repoDir(repo), pkg);
2630
+ const bin = repo ? import_node_path8.default.join(this.graph.bin, "external", import_node_path8.default.basename(this.repoDir(repo)), pkg) : import_node_path8.default.join(this.graph.bin, pkg);
2599
2631
  return [source, bin];
2600
2632
  }
2601
2633
  path(label) {
2602
2634
  const { repo, pkg, name } = splitLabel(label);
2603
2635
  if (this.generated.has(label)) {
2604
2636
  const [, bin] = this.packageDirs(label);
2605
- return import_node_path.default.join(bin, name);
2637
+ return import_node_path8.default.join(bin, name);
2606
2638
  }
2607
- return import_node_path.default.join(this.repoDir(repo), pkg, name);
2639
+ return import_node_path8.default.join(this.repoDir(repo), pkg, name);
2608
2640
  }
2609
2641
  /** files a label list names: filegroups, aliases and rule outputs expanded. */
2610
2642
  expand(labels, from) {
@@ -2634,9 +2666,9 @@ function readBazelAppTarget(buildFile, targetName, configurationName, options =
2634
2666
  throw new Error(
2635
2667
  `${buildFile}: pass --target with the ios_application the bazel package builds`
2636
2668
  );
2637
- const root = import_node_fs.default.realpathSync.native(workspaceRoot(import_node_fs.default.realpathSync.native(buildFile)));
2638
- const pkg = import_node_path.default.relative(root, import_node_path.default.dirname(import_node_fs.default.realpathSync.native(buildFile)));
2639
- const label = `//${pkg.split(import_node_path.default.sep).join("/")}:${targetName}`;
2669
+ const root = import_node_fs6.default.realpathSync.native(workspaceRoot(import_node_fs6.default.realpathSync.native(buildFile)));
2670
+ const pkg = import_node_path8.default.relative(root, import_node_path8.default.dirname(import_node_fs6.default.realpathSync.native(buildFile)));
2671
+ const label = `//${pkg.split(import_node_path8.default.sep).join("/")}:${targetName}`;
2640
2672
  const configuration = configurationName ?? "Debug";
2641
2673
  const graph = bazelGraph(root, label, configuration);
2642
2674
  const files = new BazelFiles(graph, root);
@@ -2668,7 +2700,7 @@ function readBazelAppTarget(buildFile, targetName, configurationName, options =
2668
2700
  if (known) return known;
2669
2701
  const own = {
2670
2702
  includes: (rule.attrs.get("includes")?.list ?? []).flatMap(
2671
- (include) => files.packageDirs(rule.label).map((dir) => import_node_path.default.normalize(import_node_path.default.join(dir, include)))
2703
+ (include) => files.packageDirs(rule.label).map((dir) => import_node_path8.default.normalize(import_node_path8.default.join(dir, include)))
2672
2704
  ),
2673
2705
  defines: rule.attrs.get("defines")?.list ?? [],
2674
2706
  moduleMaps: ["objc_library", "cc_library"].includes(rule.ruleClass) ? [moduleMapOf(rule)] : []
@@ -2693,11 +2725,11 @@ function readBazelAppTarget(buildFile, targetName, configurationName, options =
2693
2725
  return result;
2694
2726
  };
2695
2727
  const debug = configuration !== "Release";
2696
- const products = import_node_path.default.join(root, PRODUCTS);
2728
+ const products = import_node_path8.default.join(root, PRODUCTS);
2697
2729
  const resources = [];
2698
2730
  const resourceNames = {};
2699
2731
  const moduleNameOf = (rule) => rule.attrs.get("module_name")?.value || splitLabel(rule.label).pkg.concat("_", splitLabel(rule.label).name).replace(/[^A-Za-z0-9_]/g, "_");
2700
- const moduleMapOf = (rule) => import_node_path.default.join(products, "modulemaps", moduleNameOf(rule), "module.modulemap");
2732
+ const moduleMapOf = (rule) => import_node_path8.default.join(products, "modulemaps", moduleNameOf(rule), "module.modulemap");
2701
2733
  const idOf = (rule) => `${root}/BUILD#${rule.label}`;
2702
2734
  const collectData = (rule) => {
2703
2735
  for (const raw of rule.attrs.get("data")?.list ?? []) {
@@ -2709,7 +2741,7 @@ function readBazelAppTarget(buildFile, targetName, configurationName, options =
2709
2741
  target.label
2710
2742
  )) {
2711
2743
  resources.push(file);
2712
- resourceNames[file] = import_node_path.default.posix.join(bundle, import_node_path.default.basename(file));
2744
+ resourceNames[file] = import_node_path8.default.posix.join(bundle, import_node_path8.default.basename(file));
2713
2745
  }
2714
2746
  continue;
2715
2747
  }
@@ -2811,14 +2843,14 @@ function readBazelAppTarget(buildFile, targetName, configurationName, options =
2811
2843
  );
2812
2844
  const text2 = `module ${moduleName} {
2813
2845
  ${published.map(
2814
- (file) => ` ${textual.has(file) ? "textual header" : "header"} "${import_node_path.default.relative(import_node_path.default.dirname(moduleMap), file)}"
2846
+ (file) => ` ${textual.has(file) ? "textual header" : "header"} "${import_node_path8.default.relative(import_node_path8.default.dirname(moduleMap), file)}"
2815
2847
  `
2816
2848
  ).join("")} export *
2817
2849
  }
2818
2850
  `;
2819
- import_node_fs.default.mkdirSync(import_node_path.default.dirname(moduleMap), { recursive: true });
2820
- if (!import_node_fs.default.existsSync(moduleMap) || import_node_fs.default.readFileSync(moduleMap, "utf8") !== text2)
2821
- import_node_fs.default.writeFileSync(moduleMap, text2);
2851
+ import_node_fs6.default.mkdirSync(import_node_path8.default.dirname(moduleMap), { recursive: true });
2852
+ if (!import_node_fs6.default.existsSync(moduleMap) || import_node_fs6.default.readFileSync(moduleMap, "utf8") !== text2)
2853
+ import_node_fs6.default.writeFileSync(moduleMap, text2);
2822
2854
  const clangDefines = [...debug ? ["DEBUG=1"] : [], ...defines].map(
2823
2855
  (define) => `-D${define}`
2824
2856
  );
@@ -2889,7 +2921,7 @@ ${published.map(
2889
2921
  const bundle = files.expand(dep.attrs.get("xcframework_imports")?.list ?? [], dep.label).map(
2890
2922
  (file) => file.slice(0, file.indexOf(".xcframework/") + ".xcframework".length)
2891
2923
  ).find((file) => file.endsWith(".xcframework"));
2892
- return bundle ? [[import_node_path.default.basename(bundle, ".xcframework"), bundle]] : [];
2924
+ return bundle ? [[import_node_path8.default.basename(bundle, ".xcframework"), bundle]] : [];
2893
2925
  })
2894
2926
  )
2895
2927
  ].map(([name, file]) => ({
@@ -2901,11 +2933,11 @@ ${published.map(
2901
2933
  [rule.attrs.get("crate_root")?.value ?? ""],
2902
2934
  rule.label
2903
2935
  )[0];
2904
- let dir = crateRoot ? import_node_path.default.dirname(crateRoot) : root;
2905
- while (!import_node_fs.default.existsSync(import_node_path.default.join(dir, "Cargo.toml")) && dir.startsWith(`${root}${import_node_path.default.sep}`))
2906
- dir = import_node_path.default.dirname(dir);
2907
- const manifest = import_node_path.default.join(dir, "Cargo.toml");
2908
- if (!import_node_fs.default.existsSync(manifest))
2936
+ let dir = crateRoot ? import_node_path8.default.dirname(crateRoot) : root;
2937
+ while (!import_node_fs6.default.existsSync(import_node_path8.default.join(dir, "Cargo.toml")) && dir.startsWith(`${root}${import_node_path8.default.sep}`))
2938
+ dir = import_node_path8.default.dirname(dir);
2939
+ const manifest = import_node_path8.default.join(dir, "Cargo.toml");
2940
+ if (!import_node_fs6.default.existsSync(manifest))
2909
2941
  throw new Error(`${rule.label} has no Cargo.toml around its crate root`);
2910
2942
  return { manifest, features: rule.attrs.get("crate_features")?.list ?? [] };
2911
2943
  };
@@ -2933,20 +2965,20 @@ ${published.map(
2933
2965
  ...module2.allSources,
2934
2966
  ...module2.objc?.headers ?? []
2935
2967
  ])
2936
- ].filter((file) => !import_node_fs.default.existsSync(file));
2968
+ ].filter((file) => !import_node_fs6.default.existsSync(file));
2937
2969
  const mirror = () => {
2938
2970
  for (const rule of graph.rules.values())
2939
2971
  for (const output2 of rule.outputs) {
2940
2972
  const target = files.path(output2);
2941
2973
  if (target.endsWith(".a")) continue;
2942
- const source = import_node_path.default.join(graph.outputs, import_node_path.default.relative(graph.bin, target));
2943
- if (!import_node_fs.default.existsSync(source)) continue;
2944
- const from = import_node_fs.default.statSync(source);
2945
- const to = import_node_fs.default.existsSync(target) ? import_node_fs.default.statSync(target) : null;
2974
+ const source = import_node_path8.default.join(graph.outputs, import_node_path8.default.relative(graph.bin, target));
2975
+ if (!import_node_fs6.default.existsSync(source)) continue;
2976
+ const from = import_node_fs6.default.statSync(source);
2977
+ const to = import_node_fs6.default.existsSync(target) ? import_node_fs6.default.statSync(target) : null;
2946
2978
  if (to && to.mtimeMs === from.mtimeMs && to.size === from.size) continue;
2947
- import_node_fs.default.rmSync(target, { recursive: true, force: true });
2948
- import_node_fs.default.mkdirSync(import_node_path.default.dirname(target), { recursive: true });
2949
- import_node_fs.default.cpSync(source, target, {
2979
+ import_node_fs6.default.rmSync(target, { recursive: true, force: true });
2980
+ import_node_fs6.default.mkdirSync(import_node_path8.default.dirname(target), { recursive: true });
2981
+ import_node_fs6.default.cpSync(source, target, {
2950
2982
  recursive: true,
2951
2983
  dereference: true,
2952
2984
  preserveTimestamps: true
@@ -2962,7 +2994,7 @@ ${published.map(
2962
2994
  ...new Set(absent().flatMap((file) => owners.get(file) ?? []))
2963
2995
  ].sort();
2964
2996
  if (generators.length > 0)
2965
- (0, import_node_child_process.execFileSync)(
2997
+ (0, import_node_child_process4.execFileSync)(
2966
2998
  bazelBinary(root),
2967
2999
  ["build", ...configurationFlags(configuration), ...generators],
2968
3000
  { cwd: root, stdio: ["ignore", "pipe", "pipe"], maxBuffer: 1 << 28 }
@@ -2972,7 +3004,7 @@ ${published.map(
2972
3004
  const missing = options.requireSources === false ? [] : absent();
2973
3005
  if (missing.length > 0)
2974
3006
  throw new Error(
2975
- `bazel application has ${missing.length} unbuilt inputs: ${missing.slice(0, 5).map((file) => import_node_path.default.relative(root, file)).join(", ")}`
3007
+ `bazel application has ${missing.length} unbuilt inputs: ${missing.slice(0, 5).map((file) => import_node_path8.default.relative(root, file)).join(", ")}`
2976
3008
  );
2977
3009
  const archives = /* @__PURE__ */ new Map();
2978
3010
  for (const rule of order) {
@@ -2996,7 +3028,7 @@ ${published.map(
2996
3028
  );
2997
3029
  const key = owner?.label ?? label2;
2998
3030
  const entry = archives.get(key) ?? {
2999
- library: import_node_path.default.basename(archive),
3031
+ library: import_node_path8.default.basename(archive),
3000
3032
  holders: []
3001
3033
  };
3002
3034
  if (!entry.holders.includes(rule)) entry.holders.push(rule);
@@ -3009,9 +3041,9 @@ ${published.map(
3009
3041
  (module2) => [
3010
3042
  ...module2.allSources.filter((file) => !file.endsWith(".swift")),
3011
3043
  ...module2.objc?.headers ?? []
3012
- ].filter((file) => import_node_fs.default.existsSync(file)).flatMap(
3044
+ ].filter((file) => import_node_fs6.default.existsSync(file)).flatMap(
3013
3045
  (file) => [
3014
- ...import_node_fs.default.readFileSync(file, "utf8").matchAll(/^\s*#\s*(?:include|import)\s*[<"]([^>"\n]+)[>"]/gm)
3046
+ ...import_node_fs6.default.readFileSync(file, "utf8").matchAll(/^\s*#\s*(?:include|import)\s*[<"]([^>"\n]+)[>"]/gm)
3015
3047
  ].map((match) => match[1])
3016
3048
  )
3017
3049
  )
@@ -3029,10 +3061,10 @@ ${published.map(
3029
3061
  ],
3030
3062
  rule.label
3031
3063
  ).filter((file) => /\.(?:h|hh|hpp|hxx|inc)$/.test(file)).map((file) => {
3032
- const include = includes.find((dir) => file.startsWith(`${dir}${import_node_path.default.sep}`));
3064
+ const include = includes.find((dir) => file.startsWith(`${dir}${import_node_path8.default.sep}`));
3033
3065
  return {
3034
3066
  file,
3035
- name: include ? import_node_path.default.relative(include, file) : import_node_path.default.basename(file)
3067
+ name: include ? import_node_path8.default.relative(include, file) : import_node_path8.default.basename(file)
3036
3068
  };
3037
3069
  });
3038
3070
  });
@@ -3045,8 +3077,8 @@ ${published.map(
3045
3077
  (include) => header.name === include || header.name.endsWith(`/${include}`)
3046
3078
  )
3047
3079
  );
3048
- const bundle = import_node_path.default.join(products, "archives", `${name}.xcframework`);
3049
- const slice = import_node_path.default.join(bundle, "ios-arm64-simulator");
3080
+ const bundle = import_node_path8.default.join(products, "archives", `${name}.xcframework`);
3081
+ const slice = import_node_path8.default.join(bundle, "ios-arm64-simulator");
3050
3082
  const contents = new Map([
3051
3083
  [
3052
3084
  "Info.plist",
@@ -3067,7 +3099,7 @@ ${published.map(
3067
3099
  ],
3068
3100
  // c library headers may lean on the standard ones their callers include first
3069
3101
  [
3070
- import_node_path.default.join("ios-arm64-simulator", "Headers", `${name}.h`),
3102
+ import_node_path8.default.join("ios-arm64-simulator", "Headers", `${name}.h`),
3071
3103
  [
3072
3104
  "#include <stddef.h>",
3073
3105
  "#include <stdio.h>",
@@ -3075,7 +3107,7 @@ ${published.map(
3075
3107
  ].join("\n") + "\n"
3076
3108
  ],
3077
3109
  [
3078
- import_node_path.default.join("ios-arm64-simulator", "Headers", "module.modulemap"),
3110
+ import_node_path8.default.join("ios-arm64-simulator", "Headers", "module.modulemap"),
3079
3111
  `module ${name} {
3080
3112
  header "${name}.h"
3081
3113
  export *
@@ -3084,28 +3116,28 @@ ${published.map(
3084
3116
  ],
3085
3117
  ...headers.map(
3086
3118
  (header) => [
3087
- import_node_path.default.join("ios-arm64-simulator", "Headers", header.name),
3088
- import_node_fs.default.readFileSync(header.file)
3119
+ import_node_path8.default.join("ios-arm64-simulator", "Headers", header.name),
3120
+ import_node_fs6.default.readFileSync(header.file)
3089
3121
  ]
3090
3122
  )
3091
3123
  ]);
3092
- const digest = (0, import_node_crypto2.createHash)("sha256").update(
3124
+ const digest = (0, import_node_crypto4.createHash)("sha256").update(
3093
3125
  JSON.stringify(
3094
3126
  [...contents].map(([file, bytes]) => [
3095
3127
  file,
3096
- (0, import_node_crypto2.createHash)("sha256").update(bytes).digest("hex")
3128
+ (0, import_node_crypto4.createHash)("sha256").update(bytes).digest("hex")
3097
3129
  ])
3098
3130
  )
3099
3131
  ).digest("hex");
3100
- const stamp = import_node_path.default.join(bundle, ".peach-digest");
3101
- if (!import_node_fs.default.existsSync(stamp) || import_node_fs.default.readFileSync(stamp, "utf8") !== digest) {
3102
- import_node_fs.default.rmSync(bundle, { recursive: true, force: true });
3132
+ const stamp = import_node_path8.default.join(bundle, ".peach-digest");
3133
+ if (!import_node_fs6.default.existsSync(stamp) || import_node_fs6.default.readFileSync(stamp, "utf8") !== digest) {
3134
+ import_node_fs6.default.rmSync(bundle, { recursive: true, force: true });
3103
3135
  for (const [file, bytes] of contents) {
3104
- import_node_fs.default.mkdirSync(import_node_path.default.dirname(import_node_path.default.join(bundle, file)), { recursive: true });
3105
- import_node_fs.default.writeFileSync(import_node_path.default.join(bundle, file), bytes);
3136
+ import_node_fs6.default.mkdirSync(import_node_path8.default.dirname(import_node_path8.default.join(bundle, file)), { recursive: true });
3137
+ import_node_fs6.default.writeFileSync(import_node_path8.default.join(bundle, file), bytes);
3106
3138
  }
3107
- import_node_fs.default.writeFileSync(import_node_path.default.join(slice, library), "");
3108
- import_node_fs.default.writeFileSync(stamp, digest);
3139
+ import_node_fs6.default.writeFileSync(import_node_path8.default.join(slice, library), "");
3140
+ import_node_fs6.default.writeFileSync(stamp, digest);
3109
3141
  }
3110
3142
  binaryFrameworks.push({ name, path: bundle, rustCrate });
3111
3143
  }
@@ -3127,10 +3159,10 @@ ${published.map(
3127
3159
  ) : Array.isArray(value) ? value.map(substitute) : value && typeof value === "object" && !(value instanceof Date) && !Buffer.isBuffer(value) ? Object.fromEntries(
3128
3160
  Object.entries(value).map(([key, item]) => [key, substitute(item)])
3129
3161
  ) : value;
3130
- const infoPlistReady = infoPlistFiles.every((file) => import_node_fs.default.existsSync(file));
3162
+ const infoPlistReady = infoPlistFiles.every((file) => import_node_fs6.default.existsSync(file));
3131
3163
  const info = {};
3132
3164
  for (const file of infoPlistReady ? infoPlistFiles : []) {
3133
- const fragment = import_plist2.default.parse(import_node_fs.default.readFileSync(file, "utf8"));
3165
+ const fragment = import_plist2.default.parse(import_node_fs6.default.readFileSync(file, "utf8"));
3134
3166
  if (!fragment || typeof fragment !== "object" || Array.isArray(fragment) || fragment instanceof Date || Buffer.isBuffer(fragment))
3135
3167
  throw new Error(`${file} is not a plist dictionary`);
3136
3168
  for (const [key, value] of Object.entries(fragment)) {
@@ -3154,9 +3186,9 @@ ${published.map(
3154
3186
  });
3155
3187
  const buildFiles = [
3156
3188
  ...new Set(
3157
- order.map((rule) => import_node_path.default.join(files.packageDirs(rule.label)[0], "BUILD"))
3189
+ order.map((rule) => import_node_path8.default.join(files.packageDirs(rule.label)[0], "BUILD"))
3158
3190
  )
3159
- ].map((file) => import_node_fs.default.existsSync(file) ? file : `${file}.bazel`).filter((file) => import_node_fs.default.existsSync(file));
3191
+ ].map((file) => import_node_fs6.default.existsSync(file) ? file : `${file}.bazel`).filter((file) => import_node_fs6.default.existsSync(file));
3160
3192
  return {
3161
3193
  ...appModule,
3162
3194
  resources: [...new Set(resources)],
@@ -3545,26 +3577,26 @@ var ios_sdk_frameworks_default = {
3545
3577
  };
3546
3578
 
3547
3579
  // src/prepared-xcode-phases.ts
3548
- var import_node_crypto3 = require("node:crypto");
3549
- var import_node_fs2 = __toESM(require("node:fs"), 1);
3550
- var import_node_path2 = __toESM(require("node:path"), 1);
3580
+ var import_node_crypto5 = require("node:crypto");
3581
+ var import_node_fs7 = __toESM(require("node:fs"), 1);
3582
+ var import_node_path9 = __toESM(require("node:path"), 1);
3551
3583
  var workspaces = /* @__PURE__ */ new Map();
3552
3584
  var recording;
3553
3585
  function relativeFile(root, file) {
3554
- const relative = import_node_path2.default.relative(root, file);
3555
- if (!relative || relative === ".." || relative.startsWith(`..${import_node_path2.default.sep}`) || import_node_path2.default.isAbsolute(relative))
3586
+ const relative2 = import_node_path9.default.relative(root, file);
3587
+ if (!relative2 || relative2 === ".." || relative2.startsWith(`..${import_node_path9.default.sep}`) || import_node_path9.default.isAbsolute(relative2))
3556
3588
  throw new Error(`prepared Xcode output is outside its workspace: ${file}`);
3557
- return relative.split(import_node_path2.default.sep).join("/");
3589
+ return relative2.split(import_node_path9.default.sep).join("/");
3558
3590
  }
3559
3591
  function output(root, file) {
3560
- const relative = relativeFile(root, file);
3561
- const stat = import_node_fs2.default.statSync(file, { throwIfNoEntry: false });
3562
- if (!stat) return { path: relative, sha256: null };
3592
+ const relative2 = relativeFile(root, file);
3593
+ const stat = import_node_fs7.default.statSync(file, { throwIfNoEntry: false });
3594
+ if (!stat) return { path: relative2, sha256: null };
3563
3595
  if (!stat.isFile()) throw new Error(`prepared Xcode output is not a file: ${file}`);
3564
- relativeFile(root, import_node_fs2.default.realpathSync(file));
3565
- const bytes = import_node_fs2.default.readFileSync(file);
3596
+ relativeFile(root, import_node_fs7.default.realpathSync(file));
3597
+ const bytes = import_node_fs7.default.readFileSync(file);
3566
3598
  const prefix = Buffer.from(root);
3567
- const hash = (0, import_node_crypto3.createHash)("sha256");
3599
+ const hash = (0, import_node_crypto5.createHash)("sha256");
3568
3600
  let offset = 0;
3569
3601
  for (let index = bytes.indexOf(prefix); index !== -1; index = bytes.indexOf(prefix, offset)) {
3570
3602
  hash.update(bytes.subarray(offset, index)).update("\0workspace\0");
@@ -3572,14 +3604,14 @@ function output(root, file) {
3572
3604
  }
3573
3605
  hash.update(bytes.subarray(offset));
3574
3606
  return {
3575
- path: relative,
3607
+ path: relative2,
3576
3608
  sha256: hash.digest("hex")
3577
3609
  };
3578
3610
  }
3579
3611
  function preparedXcodePhase(project, target, phase, configuration, outputs, recorded) {
3580
3612
  const root = recording?.root ?? [...workspaces.keys()].find((root2) => {
3581
- const relative = import_node_path2.default.relative(root2, project);
3582
- return relative !== ".." && !relative.startsWith(`..${import_node_path2.default.sep}`) && !import_node_path2.default.isAbsolute(relative);
3613
+ const relative2 = import_node_path9.default.relative(root2, project);
3614
+ return relative2 !== ".." && !relative2.startsWith(`..${import_node_path9.default.sep}`) && !import_node_path9.default.isAbsolute(relative2);
3583
3615
  });
3584
3616
  if (!root) return false;
3585
3617
  const entry = {
@@ -3614,27 +3646,30 @@ function preparedXcodePhase(project, target, phase, configuration, outputs, reco
3614
3646
  }
3615
3647
 
3616
3648
  // src/swift-binary-modules.ts
3617
- var import_node_fs3 = __toESM(require("node:fs"), 1);
3618
- var import_node_path4 = __toESM(require("node:path"), 1);
3649
+ var import_node_crypto7 = require("node:crypto");
3650
+ var import_node_fs9 = __toESM(require("node:fs"), 1);
3651
+ var import_node_path11 = __toESM(require("node:path"), 1);
3619
3652
 
3620
3653
  // src/home-paths.ts
3621
- var import_node_os2 = require("node:os");
3622
- var import_node_path3 = __toESM(require("node:path"), 1);
3654
+ var import_node_crypto6 = require("node:crypto");
3655
+ var import_node_fs8 = __toESM(require("node:fs"), 1);
3656
+ var import_node_os3 = require("node:os");
3657
+ var import_node_path10 = __toESM(require("node:path"), 1);
3623
3658
  var PEACH_HOME_ENV = "PEACH_HOME";
3624
3659
  function ambientHomeDir() {
3625
- return import_node_path3.default.join((0, import_node_os2.homedir)(), ".peach");
3660
+ return import_node_path10.default.join((0, import_node_os3.homedir)(), ".peach");
3626
3661
  }
3627
3662
  function rnxHomeDir() {
3628
3663
  const override = process.env[PEACH_HOME_ENV];
3629
- return override && override.length > 0 ? import_node_path3.default.resolve(override) : ambientHomeDir();
3664
+ return override && override.length > 0 ? import_node_path10.default.resolve(override) : ambientHomeDir();
3630
3665
  }
3631
3666
  function cacheDir() {
3632
- return import_node_path3.default.join(rnxHomeDir(), "cache");
3667
+ return import_node_path10.default.join(rnxHomeDir(), "cache");
3633
3668
  }
3634
3669
  var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
3635
3670
 
3636
3671
  // src/swift-binary-modules.ts
3637
- var cacheDir2 = import_node_path4.default.join(cacheDir(), "swift-binary-modules");
3672
+ var cacheDir2 = import_node_path11.default.join(cacheDir(), "swift-binary-modules");
3638
3673
  function frameworkModules(paths) {
3639
3674
  const modules = /* @__PURE__ */ new Set();
3640
3675
  for (const file of paths) {
@@ -3644,31 +3679,41 @@ function frameworkModules(paths) {
3644
3679
  return [...modules].sort();
3645
3680
  }
3646
3681
  function localSwiftBinaryModules(dir) {
3647
- if (!import_node_fs3.default.existsSync(dir)) return [];
3648
- const slices = import_node_fs3.default.readdirSync(dir, { withFileTypes: true }).filter((slice) => slice.isDirectory());
3682
+ if (!import_node_fs9.default.existsSync(dir)) return [];
3683
+ const slices = import_node_fs9.default.readdirSync(dir, { withFileTypes: true }).filter((slice) => slice.isDirectory());
3649
3684
  const frameworks = frameworkModules(
3650
3685
  slices.flatMap(
3651
- (slice) => import_node_fs3.default.readdirSync(import_node_path4.default.join(dir, slice.name)).map((entry) => `${slice.name}/${entry}`)
3686
+ (slice) => import_node_fs9.default.readdirSync(import_node_path11.default.join(dir, slice.name)).map((entry) => `${slice.name}/${entry}`)
3652
3687
  )
3653
3688
  );
3654
3689
  if (frameworks.length > 0) return frameworks;
3655
3690
  const modules = /* @__PURE__ */ new Set();
3656
3691
  for (const slice of slices) {
3657
- const headers = import_node_path4.default.join(dir, slice.name, "Headers");
3658
- if (!import_node_fs3.default.existsSync(headers)) continue;
3659
- for (const file of import_node_fs3.default.readdirSync(headers, { recursive: true, encoding: "utf8" })) {
3660
- if (import_node_path4.default.basename(file) !== "module.modulemap") continue;
3661
- const module2 = moduleMapName(import_node_fs3.default.readFileSync(import_node_path4.default.join(headers, file), "utf8"));
3692
+ const headers = import_node_path11.default.join(dir, slice.name, "Headers");
3693
+ if (!import_node_fs9.default.existsSync(headers)) continue;
3694
+ for (const file of import_node_fs9.default.readdirSync(headers, { recursive: true, encoding: "utf8" })) {
3695
+ if (import_node_path11.default.basename(file) !== "module.modulemap") continue;
3696
+ const module2 = moduleMapName(import_node_fs9.default.readFileSync(import_node_path11.default.join(headers, file), "utf8"));
3662
3697
  if (module2) modules.add(module2);
3663
3698
  }
3664
3699
  }
3665
3700
  return [...modules].sort();
3666
3701
  }
3667
3702
 
3703
+ // src/swift-coverage/xcode-assets.ts
3704
+ var import_node_crypto9 = require("node:crypto");
3705
+ var import_node_fs12 = require("node:fs");
3706
+ var import_node_path14 = require("node:path");
3707
+
3668
3708
  // src/swift-coverage/provenance.ts
3669
- 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":"fea47e1e076b2cca23c8ac9037eced1d094e69d206df09c393979a5bd1d07a8a","xcode-target-members.ts":"2f25aaf5a3aa34395983c75935491c06bd68554c47ff1cb06b49c79499c03db0","xcode-json-project.ts":"41990ebbe4b488eef34e74c4608b4b48e5a5b299ba98ca7fbcfdfa0e77be63b6","openstep-plist.ts":"74e6ce1dac80c9c318e0e9f5e3e8cd19a898a8820c36fc160609695bcb59dcd3"}') : swiftCoverageSourceDigests((0, import_node_path.join)(__sootsim_import_meta_dirname, ".."));
3709
+ var import_node_crypto8 = require("node:crypto");
3710
+ var import_node_fs10 = require("node:fs");
3711
+ var import_node_path12 = require("node:path");
3712
+ 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((0, import_node_path12.join)(__sootsim_import_meta_dirname, ".."));
3670
3713
 
3671
3714
  // src/swift-coverage/xcode-asset-symbols.ts
3715
+ var import_node_fs11 = require("node:fs");
3716
+ var import_node_path13 = require("node:path");
3672
3717
  var silentTypes = /* @__PURE__ */ new Set([
3673
3718
  "appiconset",
3674
3719
  "brandassets",
@@ -3850,9 +3895,12 @@ var assetSymbolSettingKeys = [
3850
3895
  ];
3851
3896
 
3852
3897
  // src/swift-package-manifest.ts
3853
- var import_node_child_process4 = require("node:child_process");
3854
- var import_node_path5 = __toESM(require("node:path"), 1);
3855
- var import_node_util3 = require("node:util");
3898
+ var import_node_child_process23 = require("node:child_process");
3899
+ var import_node_crypto25 = require("node:crypto");
3900
+ var import_node_fs42 = __toESM(require("node:fs"), 1);
3901
+ var import_node_os13 = __toESM(require("node:os"), 1);
3902
+ var import_node_path43 = __toESM(require("node:path"), 1);
3903
+ var import_node_util4 = require("node:util");
3856
3904
 
3857
3905
  // src/git-repo-env.ts
3858
3906
  var UNATTENDED_GIT_ENV = {
@@ -3860,14 +3908,99 @@ var UNATTENDED_GIT_ENV = {
3860
3908
  GIT_SSH_COMMAND: process.env.GIT_SSH_COMMAND ?? "ssh -o BatchMode=yes"
3861
3909
  };
3862
3910
 
3911
+ // src/swift-distribution.ts
3912
+ var import_node_fs41 = __toESM(require("node:fs"), 1);
3913
+ var import_node_os12 = __toESM(require("node:os"), 1);
3914
+ var import_node_path42 = __toESM(require("node:path"), 1);
3915
+
3916
+ // ../contrast-runtime-delivery/src/index.ts
3917
+ var import_node_child_process7 = require("node:child_process");
3918
+ var import_node_crypto10 = __toESM(require("node:crypto"), 1);
3919
+ var import_node_fs16 = __toESM(require("node:fs"), 1);
3920
+ var import_node_os6 = __toESM(require("node:os"), 1);
3921
+ var import_node_path17 = __toESM(require("node:path"), 1);
3922
+ var import_promises3 = require("node:stream/promises");
3923
+ var import_node_zlib2 = __toESM(require("node:zlib"), 1);
3924
+
3925
+ // src/process-group.ts
3926
+ var import_node_child_process6 = require("node:child_process");
3927
+ var import_node_fs14 = require("node:fs");
3928
+ var import_node_os5 = require("node:os");
3929
+ var import_node_path15 = require("node:path");
3930
+ var import_node_stream = require("node:stream");
3931
+ var import_promises2 = require("node:timers/promises");
3932
+
3933
+ // src/process-table.ts
3934
+ var import_node_child_process5 = require("node:child_process");
3935
+ var import_node_fs13 = require("node:fs");
3936
+ var import_node_os4 = require("node:os");
3937
+
3938
+ // ../contrast-runtime-delivery/src/product.ts
3939
+ var import_node_fs15 = __toESM(require("node:fs"), 1);
3940
+ var import_node_path16 = __toESM(require("node:path"), 1);
3941
+
3942
+ // cli/drivers/linux-browser-libs.ts
3943
+ var import_node_child_process8 = require("node:child_process");
3944
+ var import_node_fs17 = require("node:fs");
3945
+ var import_node_path18 = require("node:path");
3946
+
3863
3947
  // src/swift-compile.ts
3864
- var v5 = __toESM(require("valibot"), 1);
3948
+ var import_node_child_process22 = require("node:child_process");
3949
+ var import_node_crypto23 = require("node:crypto");
3950
+ var import_node_fs38 = require("node:fs");
3951
+ var import_node_os11 = __toESM(require("node:os"), 1);
3952
+ var import_node_path39 = __toESM(require("node:path"), 1);
3953
+ var v5 = __toESM(require("peachsim/vendor/valibot"), 1);
3954
+
3955
+ // src/admitted-mac-build.ts
3956
+ var import_node_child_process9 = require("node:child_process");
3957
+
3958
+ // src/retired-cache-directory.ts
3959
+ var import_node_crypto11 = require("node:crypto");
3960
+ var import_node_fs19 = require("node:fs");
3961
+ var import_promises4 = require("node:fs/promises");
3962
+ var import_node_path19 = __toESM(require("node:path"), 1);
3963
+
3964
+ // src/process-liveness.ts
3965
+ var import_node_fs18 = require("node:fs");
3966
+
3967
+ // src/swift-compiler-digest.ts
3968
+ var import_node_crypto12 = require("node:crypto");
3969
+ var import_node_fs20 = require("node:fs");
3970
+ var import_node_path20 = __toESM(require("node:path"), 1);
3971
+
3972
+ // src/swift-darwin-records.ts
3973
+ var import_node_child_process11 = require("node:child_process");
3974
+ var import_node_fs22 = require("node:fs");
3975
+ var import_node_os7 = require("node:os");
3976
+ var import_node_path22 = __toESM(require("node:path"), 1);
3977
+
3978
+ // src/swift-shared-sdk.ts
3979
+ var import_node_child_process10 = require("node:child_process");
3980
+ var import_node_crypto13 = require("node:crypto");
3981
+ var import_node_fs21 = __toESM(require("node:fs"), 1);
3982
+ var import_node_path21 = __toESM(require("node:path"), 1);
3983
+
3984
+ // src/swift-guest-compile.ts
3985
+ var import_node_child_process17 = require("node:child_process");
3986
+ var import_node_fs30 = require("node:fs");
3987
+ var import_node_path30 = __toESM(require("node:path"), 1);
3988
+
3989
+ // src/swift-guest-archive.ts
3990
+ var import_node_child_process13 = require("node:child_process");
3991
+ var import_node_crypto15 = require("node:crypto");
3992
+ var import_node_fs24 = require("node:fs");
3993
+ var import_node_path24 = __toESM(require("node:path"), 1);
3865
3994
 
3866
3995
  // src/swift-wasm-prune.ts
3867
- var v2 = __toESM(require("valibot"), 1);
3996
+ var import_node_child_process12 = require("node:child_process");
3997
+ var import_node_crypto14 = require("node:crypto");
3998
+ var import_node_fs23 = __toESM(require("node:fs"), 1);
3999
+ var import_node_path23 = __toESM(require("node:path"), 1);
4000
+ var v2 = __toESM(require("peachsim/vendor/valibot"), 1);
3868
4001
 
3869
4002
  // src/swiftRuntimeProductContract.ts
3870
- var v = __toESM(require("valibot"), 1);
4003
+ var v = __toESM(require("peachsim/vendor/valibot"), 1);
3871
4004
  var swiftFrameworkProductSchema = v.object({
3872
4005
  version: v.literal(1),
3873
4006
  packageName: v.string(),
@@ -4010,14 +4143,31 @@ var SWIFTUI_WRAPPER_HOST_PROTOCOLS = new Set(
4010
4143
  ].map((name) => `$s7SwiftUI${name.length}${name}Mp`)
4011
4144
  );
4012
4145
 
4146
+ // src/swift-guest-link.ts
4147
+ var import_node_child_process14 = require("node:child_process");
4148
+ var import_node_fs27 = __toESM(require("node:fs"), 1);
4149
+ var import_node_path27 = __toESM(require("node:path"), 1);
4150
+ var import_node_string_decoder = require("node:string_decoder");
4151
+
4152
+ // src/swift-guest-manifest.ts
4153
+ var import_node_crypto16 = require("node:crypto");
4154
+ var import_node_fs25 = require("node:fs");
4155
+
4013
4156
  // src/swift-guest-projection-storage.ts
4014
4157
  var maxProjectionRegions = 1 << 20;
4015
4158
 
4016
4159
  // src/swift-guest-runtime-plan.ts
4017
- var v4 = __toESM(require("valibot"), 1);
4160
+ var import_node_crypto18 = require("node:crypto");
4161
+ var import_node_fs26 = require("node:fs");
4162
+ var import_node_path26 = __toESM(require("node:path"), 1);
4163
+ var v4 = __toESM(require("peachsim/vendor/valibot"), 1);
4164
+
4165
+ // src/swift-guest-source-plan.ts
4166
+ var import_node_path25 = __toESM(require("node:path"), 1);
4018
4167
 
4019
4168
  // src/swift-runtime-products.ts
4020
- var v3 = __toESM(require("valibot"), 1);
4169
+ var import_node_crypto17 = require("node:crypto");
4170
+ var v3 = __toESM(require("peachsim/vendor/valibot"), 1);
4021
4171
  var packageSchema = v3.object({
4022
4172
  name: v3.string(),
4023
4173
  products: v3.array(
@@ -4037,9 +4187,17 @@ var packageSchema = v3.object({
4037
4187
  )
4038
4188
  });
4039
4189
 
4190
+ // src/swift-guest-source-inputs.ts
4191
+ var import_node_child_process15 = require("node:child_process");
4192
+ var import_node_crypto19 = require("node:crypto");
4193
+ var import_node_fs28 = require("node:fs");
4194
+ var import_node_path28 = __toESM(require("node:path"), 1);
4195
+
4040
4196
  // src/wasm-optimize.ts
4041
- var import_node_child_process2 = require("node:child_process");
4042
- var import_node_util = require("node:util");
4197
+ var import_node_child_process16 = require("node:child_process");
4198
+ var import_node_fs29 = require("node:fs");
4199
+ var import_node_path29 = require("node:path");
4200
+ var import_node_util2 = require("node:util");
4043
4201
 
4044
4202
  // src/binaryen.lock.json
4045
4203
  var binaryen_lock_default = {
@@ -4081,14 +4239,28 @@ var FEATURES = [
4081
4239
  var KEEP_WASM_NAMES = process.env.PEACH_SWIFT_NAMES === "1";
4082
4240
  var LOWERING = ["--memory64-lowering", "--table64-lowering"];
4083
4241
  var BINARYEN_VERSION = binaryen_lock_default.version;
4084
- var runBinaryen = (0, import_node_util.promisify)(import_node_child_process2.execFile);
4242
+ var runBinaryen = (0, import_node_util2.promisify)(import_node_child_process16.execFile);
4085
4243
  var WASM_LOWER_IDENTITY = `binaryen ${BINARYEN_VERSION} narrow ${LOWERING.join(" ")} ${FEATURES.join(",")} unoptimized-names`;
4086
4244
  var BINARYEN_RELEASES = new Map(Object.entries(binaryen_lock_default.platforms));
4087
4245
 
4246
+ // src/swift-header-compiler.ts
4247
+ var import_node_crypto20 = require("node:crypto");
4248
+ var import_node_fs31 = require("node:fs");
4249
+ var import_node_http = require("node:http");
4250
+ var import_node_path31 = __toESM(require("node:path"), 1);
4251
+
4252
+ // src/swift-header-dependencies.ts
4253
+ var import_node_path32 = __toESM(require("node:path"), 1);
4254
+
4088
4255
  // src/swift-icu.ts
4089
- var import_node_child_process3 = require("node:child_process");
4090
- var import_node_util2 = require("node:util");
4091
- var import_node_zlib = require("node:zlib");
4256
+ var import_node_child_process18 = require("node:child_process");
4257
+ var import_node_crypto21 = require("node:crypto");
4258
+ var import_node_fs32 = require("node:fs");
4259
+ var import_promises5 = require("node:fs/promises");
4260
+ var import_node_os8 = __toESM(require("node:os"), 1);
4261
+ var import_node_path33 = __toESM(require("node:path"), 1);
4262
+ var import_node_util3 = require("node:util");
4263
+ var import_node_zlib3 = require("node:zlib");
4092
4264
 
4093
4265
  // ../sootsim-swift/src/icuData.ts
4094
4266
  var PACK_BYTES = 64 * 1024;
@@ -4096,10 +4268,38 @@ var VERSION = 1;
4096
4268
  var SWIFT_ICU_PACKED = `picu${VERSION}`;
4097
4269
 
4098
4270
  // src/swift-icu.ts
4099
- var run = (0, import_node_util2.promisify)(import_node_child_process3.execFile);
4100
- var deflate = (0, import_node_util2.promisify)(import_node_zlib.gzip);
4101
- var compressBrotli = (0, import_node_util2.promisify)(import_node_zlib.brotliCompress);
4102
- var inflateGzip = (0, import_node_util2.promisify)(import_node_zlib.gunzip);
4271
+ var run = (0, import_node_util3.promisify)(import_node_child_process18.execFile);
4272
+ var deflate = (0, import_node_util3.promisify)(import_node_zlib3.gzip);
4273
+ var compressBrotli = (0, import_node_util3.promisify)(import_node_zlib3.brotliCompress);
4274
+ var inflateGzip = (0, import_node_util3.promisify)(import_node_zlib3.gunzip);
4275
+
4276
+ // src/swift-link-roots.ts
4277
+ var import_node_fs33 = __toESM(require("node:fs"), 1);
4278
+ var import_node_path34 = __toESM(require("node:path"), 1);
4279
+
4280
+ // src/swift-project-user.ts
4281
+ var import_node_child_process19 = require("node:child_process");
4282
+ var import_node_fs34 = require("node:fs");
4283
+ var import_node_path35 = __toESM(require("node:path"), 1);
4284
+
4285
+ // src/swift-reproducible.ts
4286
+ var import_node_fs35 = require("node:fs");
4287
+ var import_node_os9 = __toESM(require("node:os"), 1);
4288
+
4289
+ // src/swift-root-lock.ts
4290
+ var import_node_child_process20 = require("node:child_process");
4291
+ var import_node_crypto22 = require("node:crypto");
4292
+ var import_node_fs36 = require("node:fs");
4293
+ var import_node_os10 = require("node:os");
4294
+ var import_node_path36 = __toESM(require("node:path"), 1);
4295
+
4296
+ // src/swift-uniform-type-constants.ts
4297
+ var import_node_child_process21 = require("node:child_process");
4298
+ var import_node_path37 = __toESM(require("node:path"), 1);
4299
+
4300
+ // src/xcode-header-search.ts
4301
+ var import_node_fs37 = __toESM(require("node:fs"), 1);
4302
+ var import_node_path38 = __toESM(require("node:path"), 1);
4103
4303
 
4104
4304
  // src/swift-compile.ts
4105
4305
  var OPTIONAL_FRAMEWORK_DEPENDENCIES = {
@@ -4222,6 +4422,8 @@ var SHARED_ARTIFACT_BUDGET_BYTES = 4 * 1024 ** 3;
4222
4422
 
4223
4423
  // src/answeredNativePackages.ts
4224
4424
  var import_node_async_hooks = require("node:async_hooks");
4425
+ var import_node_fs39 = require("node:fs");
4426
+ var import_node_path40 = require("node:path");
4225
4427
 
4226
4428
  // src/launchMetadataContract.ts
4227
4429
  var LAUNCH_METADATA_KEYS_PATH = "node/launch-metadata-keys.json";
@@ -4245,6 +4447,11 @@ var LAUNCH_METADATA_KEYS = [
4245
4447
  ];
4246
4448
  var LAUNCH_METADATA_KEYS_BEFORE_RUNTIME_STATED_THEM = LAUNCH_METADATA_KEYS.filter((key) => key !== "widgetExtension");
4247
4449
 
4450
+ // src/runtime-assets.ts
4451
+ var import_fs = __toESM(require("fs"), 1);
4452
+ var import_path = __toESM(require("path"), 1);
4453
+ var import_url = require("url");
4454
+
4248
4455
  // src/answeredNativePackages.ts
4249
4456
  var runtimeLaunchMetadataKeysFile = {
4250
4457
  path: LAUNCH_METADATA_KEYS_PATH,
@@ -4254,12 +4461,17 @@ var runtimeLaunchMetadataKeysFile = {
4254
4461
  var unansweredStore = new import_node_async_hooks.AsyncLocalStorage();
4255
4462
  var answeredStore = new import_node_async_hooks.AsyncLocalStorage();
4256
4463
 
4464
+ // src/nitroAdapterContract.ts
4465
+ var import_node_crypto24 = require("node:crypto");
4466
+ var import_node_fs40 = require("node:fs");
4467
+ var import_node_path41 = __toESM(require("node:path"), 1);
4468
+
4257
4469
  // src/swift-package-manifest.ts
4258
- var cacheDir3 = import_node_path5.default.join(cacheDir(), "swift-manifests");
4259
- var execFileAsync = (0, import_node_util3.promisify)(import_node_child_process4.execFile);
4470
+ var cacheDir3 = import_node_path43.default.join(cacheDir(), "swift-manifests");
4471
+ var execFileAsync = (0, import_node_util4.promisify)(import_node_child_process23.execFile);
4260
4472
 
4261
4473
  // src/xcode-json-project.ts
4262
- var import_node_path6 = __toESM(require("node:path"), 1);
4474
+ var import_node_path44 = __toESM(require("node:path"), 1);
4263
4475
  var import_json5 = __toESM(require_lib(), 1);
4264
4476
  var isObject = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
4265
4477
  var text = (value) => typeof value === "string" ? value : void 0;
@@ -4317,7 +4529,7 @@ var PHASE_ISA = {
4317
4529
  function readXcodeJsonProject(xcodeproj, source) {
4318
4530
  const json = import_json5.default.parse(source);
4319
4531
  if (!isJsonObject(json)) throw new Error(`${xcodeproj}/project.xcproj is not an object`);
4320
- const projectDir = import_node_path6.default.dirname(xcodeproj);
4532
+ const projectDir = import_node_path44.default.dirname(xcodeproj);
4321
4533
  const objects = {};
4322
4534
  let next = 0;
4323
4535
  const add = (entry, id) => {
@@ -4330,7 +4542,7 @@ function readXcodeJsonProject(xcodeproj, source) {
4330
4542
  const base = /^<([A-Z]+)>\/(.*)$/.exec(raw);
4331
4543
  if (base) {
4332
4544
  if (base[1] === "PROJECT")
4333
- return { sourceTree: "<absolute>", path: import_node_path6.default.join(projectDir, base[2]) };
4545
+ return { sourceTree: "<absolute>", path: import_node_path44.default.join(projectDir, base[2]) };
4334
4546
  if (base[1] === "PRODUCTS")
4335
4547
  return { sourceTree: "BUILT_PRODUCTS_DIR", path: base[2] };
4336
4548
  return null;
@@ -4338,7 +4550,7 @@ function readXcodeJsonProject(xcodeproj, source) {
4338
4550
  const unescaped = raw.replaceAll("\\<", "<");
4339
4551
  if (unescaped.startsWith("/")) return { sourceTree: "<absolute>", path: unescaped };
4340
4552
  if (unescaped.startsWith("~")) return null;
4341
- return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path6.default.join(groupDir, unescaped) };
4553
+ return groupDir === null ? null : { sourceTree: "<absolute>", path: import_node_path44.default.join(groupDir, unescaped) };
4342
4554
  };
4343
4555
  const memberships = [];
4344
4556
  const folders = [];
@@ -4349,7 +4561,7 @@ function readXcodeJsonProject(xcodeproj, source) {
4349
4561
  const kind = text(entry.kind) ?? "file-reference";
4350
4562
  const raw = text(entry.path) ?? "";
4351
4563
  const located = raw === "" ? null : locate(raw, parent.dir);
4352
- const name = text(entry.name) ?? import_node_path6.default.basename(raw);
4564
+ const name = text(entry.name) ?? import_node_path44.default.basename(raw);
4353
4565
  const node = { id: "", name, dir: null, parent, children: [] };
4354
4566
  if (kind === "group" || kind === "variant-group" || kind === "version-group") {
4355
4567
  node.dir = raw === "" ? parent.dir : located?.sourceTree === "<absolute>" ? located.path : null;
@@ -4453,14 +4665,14 @@ function readXcodeJsonProject(xcodeproj, source) {
4453
4665
  const reference = specialized.has(name) ? specialized.get(name) : file;
4454
4666
  const base = lookup(reference);
4455
4667
  const anchor = isObject(reference) ? lookupNode(reference.anchor, root)?.id : null;
4456
- const relative = isObject(reference) ? text(reference["relative-path"]) : null;
4668
+ const relative2 = isObject(reference) ? text(reference["relative-path"]) : null;
4457
4669
  return add({
4458
4670
  isa: "XCBuildConfiguration",
4459
4671
  name,
4460
4672
  buildSettings: settings,
4461
- ...base ? { baseConfigurationReference: base } : anchor && relative ? {
4673
+ ...base ? { baseConfigurationReference: base } : anchor && relative2 ? {
4462
4674
  baseConfigurationReferenceAnchor: anchor,
4463
- baseConfigurationReferenceRelativePath: relative
4675
+ baseConfigurationReferenceRelativePath: relative2
4464
4676
  } : {}
4465
4677
  });
4466
4678
  })
@@ -4470,7 +4682,7 @@ function readXcodeJsonProject(xcodeproj, source) {
4470
4682
  if (!isObject(entry)) continue;
4471
4683
  const repository = text(entry.repository);
4472
4684
  const local = text(entry.path);
4473
- const name = local !== void 0 ? import_node_path6.default.basename(import_node_path6.default.resolve(import_node_path6.default.dirname(xcodeproj), local)) : import_node_path6.default.basename(repository ?? "").replace(/\.git$/, "");
4685
+ const name = local !== void 0 ? import_node_path44.default.basename(import_node_path44.default.resolve(import_node_path44.default.dirname(xcodeproj), local)) : import_node_path44.default.basename(repository ?? "").replace(/\.git$/, "");
4474
4686
  const id = text(entry.kind) === "local" && local !== void 0 ? add({ isa: "XCLocalSwiftPackageReference", relativePath: local }) : add({
4475
4687
  isa: "XCRemoteSwiftPackageReference",
4476
4688
  repositoryURL: repository ?? "",
@@ -4691,28 +4903,28 @@ var CONDITIONS = {
4691
4903
  variant: "normal"
4692
4904
  };
4693
4905
  function walkFiles(dir) {
4694
- if (!import_node_fs4.default.existsSync(dir)) return [];
4906
+ if (!import_node_fs43.default.existsSync(dir)) return [];
4695
4907
  const out = [];
4696
- for (const entry of import_node_fs4.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
4908
+ for (const entry of import_node_fs43.default.readdirSync(dir, { withFileTypes: true }).sort((left, right) => left.name.localeCompare(right.name))) {
4697
4909
  if (entry.name.startsWith(".")) continue;
4698
- const full = import_node_path7.default.join(dir, entry.name);
4910
+ const full = import_node_path45.default.join(dir, entry.name);
4699
4911
  if (entry.isDirectory()) out.push(...walkFiles(full));
4700
4912
  else if (entry.isFile()) out.push(full);
4701
4913
  }
4702
4914
  return out;
4703
4915
  }
4704
- var isDirectory = (dir) => import_node_fs4.default.existsSync(dir) && import_node_fs4.default.statSync(dir).isDirectory();
4916
+ var isDirectory = (dir) => import_node_fs43.default.existsSync(dir) && import_node_fs43.default.statSync(dir).isDirectory();
4705
4917
  function readXcconfig(file, read) {
4706
- if (read.includes(file) || !import_node_fs4.default.existsSync(file)) return {};
4918
+ if (read.includes(file) || !import_node_fs43.default.existsSync(file)) return {};
4707
4919
  read.push(file);
4708
4920
  const settings = {};
4709
- for (const raw of import_node_fs4.default.readFileSync(file, "utf8").split("\n")) {
4921
+ for (const raw of import_node_fs43.default.readFileSync(file, "utf8").split("\n")) {
4710
4922
  const line = raw.replace(/\/\/.*$/, "").trim();
4711
4923
  const include = /^#include\??\s+"([^"]+)"/.exec(line);
4712
4924
  if (include) {
4713
4925
  Object.assign(
4714
4926
  settings,
4715
- readXcconfig(import_node_path7.default.resolve(import_node_path7.default.dirname(file), include[1]), read)
4927
+ readXcconfig(import_node_path45.default.resolve(import_node_path45.default.dirname(file), include[1]), read)
4716
4928
  );
4717
4929
  continue;
4718
4930
  }
@@ -4757,8 +4969,8 @@ function applyOperator(value, operator) {
4757
4969
  return value.replace(/[^A-Za-z0-9_]/g, "_").replace(/^[0-9]/, "_");
4758
4970
  case "standardizepath":
4759
4971
  if (value === ".") return value;
4760
- if (import_node_path7.default.posix.isAbsolute(value))
4761
- return import_node_path7.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
4972
+ if (import_node_path45.default.posix.isAbsolute(value))
4973
+ return import_node_path45.default.posix.normalize(value).replace(/(?<=.)\/$/, "");
4762
4974
  return value.split("/").filter((component) => component !== "" && component !== ".").join("/");
4763
4975
  }
4764
4976
  throw new Error(`unsupported build setting operator :${operator}`);
@@ -4767,22 +4979,22 @@ function decodeXml(text2) {
4767
4979
  return text2.replaceAll("&quot;", '"').replaceAll("&apos;", "'").replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&amp;", "&");
4768
4980
  }
4769
4981
  function workspaceReferences(workspace) {
4770
- const data = import_node_path7.default.join(workspace, "contents.xcworkspacedata");
4771
- if (!import_node_fs4.default.existsSync(data))
4982
+ const data = import_node_path45.default.join(workspace, "contents.xcworkspacedata");
4983
+ if (!import_node_fs43.default.existsSync(data))
4772
4984
  throw new Error(`${workspace} has no contents.xcworkspacedata`);
4773
- const container = import_node_path7.default.dirname(workspace);
4985
+ const container = import_node_path45.default.dirname(workspace);
4774
4986
  const locate = (location, base) => {
4775
4987
  const colon = location.indexOf(":");
4776
4988
  const kind = location.slice(0, colon);
4777
4989
  const rest = location.slice(colon + 1);
4778
- if (kind === "group") return import_node_path7.default.resolve(base, rest);
4779
- if (kind === "container" || kind === "self") return import_node_path7.default.resolve(container, rest);
4780
- if (kind === "absolute") return import_node_path7.default.resolve(rest);
4781
- throw new Error(`${import_node_path7.default.basename(workspace)} has an unsupported location ${location}`);
4990
+ if (kind === "group") return import_node_path45.default.resolve(base, rest);
4991
+ if (kind === "container" || kind === "self") return import_node_path45.default.resolve(container, rest);
4992
+ if (kind === "absolute") return import_node_path45.default.resolve(rest);
4993
+ throw new Error(`${import_node_path45.default.basename(workspace)} has an unsupported location ${location}`);
4782
4994
  };
4783
4995
  const groups = [container];
4784
4996
  const references = [];
4785
- for (const [, closing, tag, attributes, selfClosing] of import_node_fs4.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
4997
+ for (const [, closing, tag, attributes, selfClosing] of import_node_fs43.default.readFileSync(data, "utf8").matchAll(/<(\/?)(Group|FileRef)\b([^>]*?)(\/?)>/g)) {
4786
4998
  if (closing) {
4787
4999
  if (tag === "Group") groups.pop();
4788
5000
  continue;
@@ -4833,8 +5045,8 @@ function remotePackageRequirements(projects) {
4833
5045
  var loaded = /* @__PURE__ */ new Map();
4834
5046
  function xcodeProjectFile(xcodeproj) {
4835
5047
  for (const name of ["project.pbxproj", "project.xcproj"]) {
4836
- const file = import_node_path7.default.join(xcodeproj, name);
4837
- if (import_node_fs4.default.existsSync(file)) return file;
5048
+ const file = import_node_path45.default.join(xcodeproj, name);
5049
+ if (import_node_fs43.default.existsSync(file)) return file;
4838
5050
  }
4839
5051
  return null;
4840
5052
  }
@@ -4842,8 +5054,8 @@ function loadProject(xcodeproj) {
4842
5054
  const projectFile = xcodeProjectFile(xcodeproj);
4843
5055
  if (!projectFile)
4844
5056
  throw new Error(`${xcodeproj} has no project.pbxproj or project.xcproj`);
4845
- const source = import_node_fs4.default.readFileSync(projectFile, "utf8");
4846
- const digest = (0, import_node_crypto4.createHash)("sha256").update(source).digest("hex");
5057
+ const source = import_node_fs43.default.readFileSync(projectFile, "utf8");
5058
+ const digest = (0, import_node_crypto26.createHash)("sha256").update(source).digest("hex");
4847
5059
  const cached = loaded.get(projectFile);
4848
5060
  if (cached?.digest === digest) return cached.project;
4849
5061
  const root = projectFile.endsWith(".xcproj") ? readXcodeJsonProject(xcodeproj, source) : parseOpenStepPlist(source);
@@ -4859,10 +5071,10 @@ function loadProject(xcodeproj) {
4859
5071
  if (!project || project.isa !== "PBXProject") {
4860
5072
  throw new Error(`${projectFile} has no PBXProject root`);
4861
5073
  }
4862
- const projectDir = import_node_fs4.default.realpathSync.native(
4863
- import_node_path7.default.resolve(import_node_path7.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
5074
+ const projectDir = import_node_fs43.default.realpathSync.native(
5075
+ import_node_path45.default.resolve(import_node_path45.default.dirname(xcodeproj), str(project.projectDirPath) ?? "")
4864
5076
  );
4865
- const resolvePath = xcodePathResolver(objects, projectDir, import_node_path7.default.join);
5077
+ const resolvePath = xcodePathResolver(objects, projectDir, import_node_path45.default.join);
4866
5078
  const result = {
4867
5079
  xcodeproj,
4868
5080
  projectFile,
@@ -4880,7 +5092,7 @@ var developerDir;
4880
5092
  function selectedDeveloperDir() {
4881
5093
  developerDir ??= process.platform === "darwin" ? (
4882
5094
  // runner-toolchain-platform: darwin
4883
- (0, import_node_child_process5.execFileSync)("xcode-select", ["-p"], {
5095
+ (0, import_node_child_process24.execFileSync)("xcode-select", ["-p"], {
4884
5096
  encoding: "utf8",
4885
5097
  stdio: ["ignore", "pipe", "pipe"]
4886
5098
  }).trim()
@@ -4907,13 +5119,13 @@ function targetSettings(ref, configuration, builtins, options = {}, overrides =
4907
5119
  const name = str(config.name) ?? configuration;
4908
5120
  const base = str(config.baseConfigurationReference);
4909
5121
  const anchor = str(config.baseConfigurationReferenceAnchor);
4910
- const relative = str(config.baseConfigurationReferenceRelativePath);
5122
+ const relative2 = str(config.baseConfigurationReferenceRelativePath);
4911
5123
  const own = isDict(config.buildSettings) ? config.buildSettings : {};
4912
5124
  const directory = anchor ? project.resolvePath(anchor) : null;
4913
- const baseFile = base ? project.resolvePath(base) : directory && relative ? import_node_path7.default.resolve(directory, relative) : null;
4914
- if (options.requireSources !== false && (base || anchor || relative) && (!baseFile || !import_node_fs4.default.existsSync(baseFile)))
5125
+ const baseFile = base ? project.resolvePath(base) : directory && relative2 ? import_node_path45.default.resolve(directory, relative2) : null;
5126
+ if (options.requireSources !== false && (base || anchor || relative2) && (!baseFile || !import_node_fs43.default.existsSync(baseFile)))
4915
5127
  throw new Error(
4916
- `Unable to open base configuration reference file '${baseFile ?? base ?? relative ?? anchor}'`
5128
+ `Unable to open base configuration reference file '${baseFile ?? base ?? relative2 ?? anchor}'`
4917
5129
  );
4918
5130
  const read = [];
4919
5131
  const fromFile = baseFile ? readXcconfig(baseFile, read) : {};
@@ -5002,26 +5214,26 @@ function scriptCommand(shell, script) {
5002
5214
  return [executable, ...args, "-c", script];
5003
5215
  }
5004
5216
  function expandSearchPath(directory, rules2) {
5005
- if (import_node_path7.default.basename(directory) !== "**") return [directory];
5217
+ if (import_node_path45.default.basename(directory) !== "**") return [directory];
5006
5218
  const expanded = [];
5007
5219
  const seen = /* @__PURE__ */ new Set();
5008
- const queue = [import_node_path7.default.dirname(directory)];
5220
+ const queue = [import_node_path45.default.dirname(directory)];
5009
5221
  for (let at = 0; at < queue.length; at++) {
5010
5222
  const current = queue[at];
5011
5223
  let real;
5012
5224
  try {
5013
- real = import_node_fs4.default.realpathSync.native(current);
5225
+ real = import_node_fs43.default.realpathSync.native(current);
5014
5226
  } catch {
5015
5227
  continue;
5016
5228
  }
5017
- if (!import_node_fs4.default.statSync(real).isDirectory() || seen.has(real)) continue;
5229
+ if (!import_node_fs43.default.statSync(real).isDirectory() || seen.has(real)) continue;
5018
5230
  seen.add(real);
5019
5231
  expanded.push(current);
5020
- for (const entry of import_node_fs4.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
5232
+ for (const entry of import_node_fs43.default.readdirSync(real, { withFileTypes: true }).sort((a, b) => a.name < b.name ? -1 : a.name > b.name ? 1 : 0)) {
5021
5233
  if (entry.isSymbolicLink() ? !rules2.followLinks : !entry.isDirectory()) continue;
5022
5234
  if (rules2.excluded.some((pattern) => pattern.test(entry.name)) && !rules2.included.some((pattern) => pattern.test(entry.name)))
5023
5235
  continue;
5024
- queue.push(import_node_path7.default.join(current, entry.name));
5236
+ queue.push(import_node_path45.default.join(current, entry.name));
5025
5237
  }
5026
5238
  }
5027
5239
  return expanded;
@@ -5112,7 +5324,7 @@ function shellAssetCatalogs(script, settings, projectDir) {
5112
5324
  for (const token of tokens) {
5113
5325
  if (token.startsWith("-")) break;
5114
5326
  const file = resolve(token);
5115
- if (file?.endsWith(".xcassets")) catalogs.push(import_node_path7.default.resolve(projectDir, file));
5327
+ if (file?.endsWith(".xcassets")) catalogs.push(import_node_path45.default.resolve(projectDir, file));
5116
5328
  }
5117
5329
  }
5118
5330
  return catalogs;
@@ -5157,14 +5369,14 @@ function shellCopies(script, settings, projectDir) {
5157
5369
  if (operands.length !== 2 || operands.some((operand) => operand.startsWith("-")))
5158
5370
  return [];
5159
5371
  copies.push({
5160
- from: import_node_path7.default.resolve(projectDir, operands[0]),
5161
- to: import_node_path7.default.resolve(projectDir, operands[1])
5372
+ from: import_node_path45.default.resolve(projectDir, operands[0]),
5373
+ to: import_node_path45.default.resolve(projectDir, operands[1])
5162
5374
  });
5163
5375
  }
5164
5376
  return copies;
5165
5377
  }
5166
5378
  function fileListEntries(file, absolute) {
5167
- return import_node_fs4.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
5379
+ return import_node_fs43.default.readFileSync(file, "utf8").split(/\r?\n/).map((line) => line.trim()).filter((line) => line !== "" && !line.startsWith("#")).map(absolute);
5168
5380
  }
5169
5381
  function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5170
5382
  const { project, target, id: targetId } = ref;
@@ -5178,7 +5390,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5178
5390
  const copiedFiles = [];
5179
5391
  let generatedInfoPlist = false;
5180
5392
  const declaredInfoPlist = settings("INFOPLIST_FILE");
5181
- const infoPlistOutput = declaredInfoPlist ? import_node_path7.default.resolve(project.projectDir, declaredInfoPlist) : null;
5393
+ const infoPlistOutput = declaredInfoPlist ? import_node_path45.default.resolve(project.projectDir, declaredInfoPlist) : null;
5182
5394
  const isPreparedOutput = (file) => file === infoPlistOutput || options.requireSources !== false && file.endsWith(".swift");
5183
5395
  for (const phaseId of list(target.buildPhases)) {
5184
5396
  const phase = project.object(phaseId);
@@ -5193,7 +5405,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5193
5405
  copiedFiles.push(
5194
5406
  ...shellCopies(str(phase.shellScript) ?? "", settings, project.projectDir)
5195
5407
  );
5196
- const absolute = (raw) => import_node_path7.default.resolve(project.projectDir, expand(raw, settings));
5408
+ const absolute = (raw) => import_node_path45.default.resolve(project.projectDir, expand(raw, settings));
5197
5409
  const inputs = list(phase.inputPaths).map(absolute);
5198
5410
  const outputs = list(phase.outputPaths).map(absolute);
5199
5411
  const fileLists = /* @__PURE__ */ new Map();
@@ -5202,7 +5414,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5202
5414
  kind === "INPUT" ? phase.inputFileListPaths : phase.outputFileListPaths
5203
5415
  ).map((raw) => {
5204
5416
  const file = absolute(raw);
5205
- if (!import_node_fs4.default.existsSync(file)) {
5417
+ if (!import_node_fs43.default.existsSync(file)) {
5206
5418
  return { file, entries: [] };
5207
5419
  }
5208
5420
  return { file, entries: fileListEntries(file, absolute) };
@@ -5223,7 +5435,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5223
5435
  ...fileLists.get("OUTPUT").map((item) => item.file)
5224
5436
  ];
5225
5437
  if (allOutputs.some((file) => file.endsWith(".swift") || file === infoPlistOutput)) {
5226
- for (const file of inputFiles) if (import_node_fs4.default.existsSync(file)) projectInputs.add(file);
5438
+ for (const file of inputFiles) if (import_node_fs43.default.existsSync(file)) projectInputs.add(file);
5227
5439
  }
5228
5440
  if (options.prepareGeneratedSources === true && allOutputs.some(isPreparedOutput)) {
5229
5441
  const configuration = settings("CONFIGURATION");
@@ -5236,10 +5448,10 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5236
5448
  false
5237
5449
  ))
5238
5450
  continue;
5239
- const phaseDir = import_node_path7.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
5451
+ const phaseDir = import_node_path45.default.join(settings("TARGET_TEMP_DIR"), `Script-${phaseId}`);
5240
5452
  for (const lists of fileLists.values())
5241
5453
  for (const { file } of lists)
5242
- if (!import_node_fs4.default.existsSync(file))
5454
+ if (!import_node_fs43.default.existsSync(file))
5243
5455
  throw new Error(
5244
5456
  `${targetName}: Run Script "${script}" missing file list ${file}`
5245
5457
  );
@@ -5258,25 +5470,25 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5258
5470
  const lists = fileLists.get(kind);
5259
5471
  env[`SCRIPT_${kind}_FILE_LIST_COUNT`] = String(lists.length);
5260
5472
  lists.forEach((_item, index) => {
5261
- env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path7.default.join(
5473
+ env[`SCRIPT_${kind}_FILE_LIST_${index}`] = import_node_path45.default.join(
5262
5474
  phaseDir,
5263
5475
  `${kind}-${index}.xcfilelist`
5264
5476
  );
5265
5477
  });
5266
5478
  }
5267
- const signature = (0, import_node_crypto4.createHash)("sha256").update(
5479
+ const signature = (0, import_node_crypto26.createHash)("sha256").update(
5268
5480
  JSON.stringify([phase, [...settingKeys].map((key2) => [key2, settings(key2)])])
5269
5481
  );
5270
5482
  for (const file of inputFiles) {
5271
5483
  signature.update(file);
5272
- if (import_node_fs4.default.existsSync(file)) {
5273
- const stat = import_node_fs4.default.statSync(file);
5484
+ if (import_node_fs43.default.existsSync(file)) {
5485
+ const stat = import_node_fs43.default.statSync(file);
5274
5486
  signature.update(`${stat.mtimeMs}:${stat.ctimeMs}:${stat.size}`);
5275
5487
  } else signature.update("missing");
5276
5488
  }
5277
5489
  const stamp = signature.digest("hex");
5278
5490
  const key = `${project.projectFile}:${targetId}:${phaseId}:${settings("CONFIGURATION")}`;
5279
- if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs4.default.existsSync(file))) {
5491
+ if (preparedSourcePhases.get(key) === stamp && allOutputs.every((file) => import_node_fs43.default.existsSync(file))) {
5280
5492
  preparedXcodePhase(
5281
5493
  project.projectFile,
5282
5494
  targetId,
@@ -5287,14 +5499,14 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5287
5499
  );
5288
5500
  continue;
5289
5501
  }
5290
- import_node_fs4.default.mkdirSync(phaseDir, { recursive: true });
5291
- import_node_fs4.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
5292
- import_node_fs4.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
5502
+ import_node_fs43.default.mkdirSync(phaseDir, { recursive: true });
5503
+ import_node_fs43.default.mkdirSync(settings("BUILT_PRODUCTS_DIR"), { recursive: true });
5504
+ import_node_fs43.default.mkdirSync(settings("DERIVED_FILE_DIR"), { recursive: true });
5293
5505
  for (const output2 of allOutputs)
5294
- import_node_fs4.default.mkdirSync(import_node_path7.default.dirname(output2), { recursive: true });
5506
+ import_node_fs43.default.mkdirSync(import_node_path45.default.dirname(output2), { recursive: true });
5295
5507
  for (const [kind, lists] of fileLists)
5296
5508
  lists.forEach((item, index) => {
5297
- import_node_fs4.default.writeFileSync(
5509
+ import_node_fs43.default.writeFileSync(
5298
5510
  env[`SCRIPT_${kind}_FILE_LIST_${index}`],
5299
5511
  `${item.entries.join("\n")}
5300
5512
  `
@@ -5302,9 +5514,9 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5302
5514
  });
5303
5515
  const rawScript = str(phase.shellScript) ?? "";
5304
5516
  if (rawScript.includes("generate-modules-provider")) {
5305
- const preloadPath = import_node_path7.default.join(phaseDir, "expo-scan-timeout.cjs");
5306
- import_node_fs4.default.mkdirSync(phaseDir, { recursive: true });
5307
- import_node_fs4.default.writeFileSync(
5517
+ const preloadPath = import_node_path45.default.join(phaseDir, "expo-scan-timeout.cjs");
5518
+ import_node_fs43.default.mkdirSync(phaseDir, { recursive: true });
5519
+ import_node_fs43.default.writeFileSync(
5308
5520
  preloadPath,
5309
5521
  [
5310
5522
  "const cp = require('node:child_process');",
@@ -5326,7 +5538,7 @@ function targetMembers(ref, settings, options, settingKeys, projectInputs) {
5326
5538
  str(phase.shellPath) ?? "/bin/sh",
5327
5539
  rawScript
5328
5540
  );
5329
- (0, import_node_child_process5.execFileSync)(shell, args, {
5541
+ (0, import_node_child_process24.execFileSync)(shell, args, {
5330
5542
  cwd: project.projectDir,
5331
5543
  env,
5332
5544
  stdio: ["ignore", "pipe", "pipe"],
@@ -5342,7 +5554,7 @@ ${output2}`
5342
5554
  );
5343
5555
  }
5344
5556
  const missing = allOutputs.filter(
5345
- (file) => file === infoPlistOutput && !import_node_fs4.default.existsSync(file)
5557
+ (file) => file === infoPlistOutput && !import_node_fs43.default.existsSync(file)
5346
5558
  );
5347
5559
  if (missing.length > 0)
5348
5560
  throw new Error(
@@ -5361,9 +5573,9 @@ ${output2}`
5361
5573
  }
5362
5574
  project.visitMembers(
5363
5575
  targetId,
5364
- xcodePathResolver(project.objects, project.projectDir, import_node_path7.default.join, settings),
5365
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs4.default.existsSync(file) ? [file] : [],
5366
- import_node_path7.default.join,
5576
+ xcodePathResolver(project.objects, project.projectDir, import_node_path45.default.join, settings),
5577
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs43.default.existsSync(file) ? [file] : [],
5578
+ import_node_path45.default.join,
5367
5579
  (file, kind, bundleName) => {
5368
5580
  if (kind === "header") {
5369
5581
  headers.add(file);
@@ -5374,9 +5586,9 @@ ${output2}`
5374
5586
  if (bundleName) resourceNames[file] = bundleName;
5375
5587
  return;
5376
5588
  }
5377
- if (!import_node_fs4.default.existsSync(file)) {
5589
+ if (!import_node_fs43.default.existsSync(file)) {
5378
5590
  if (options.requireSources === false) return;
5379
- const script = scriptForOutput.get(import_node_path7.default.normalize(file));
5591
+ const script = scriptForOutput.get(import_node_path45.default.normalize(file));
5380
5592
  throw new Error(
5381
5593
  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}`
5382
5594
  );
@@ -5387,17 +5599,17 @@ ${output2}`
5387
5599
  );
5388
5600
  if (options.prepareGeneratedSources && options.requireSources !== false) {
5389
5601
  const interfaceFiles = [...resources].filter(
5390
- (file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path7.default.sep).some((part) => part.endsWith(".bundle"))
5602
+ (file) => /\.(storyboard|xib)$/.test(file) && !file.split(import_node_path45.default.sep).some((part) => part.endsWith(".bundle"))
5391
5603
  );
5392
5604
  if (process.platform !== "darwin") {
5393
5605
  let launchName = settings("INFOPLIST_KEY_UILaunchStoryboardName");
5394
- if (!launchName && infoPlistOutput && import_node_fs4.default.existsSync(infoPlistOutput)) {
5395
- const info = import_plist3.default.parse(import_node_fs4.default.readFileSync(infoPlistOutput, "utf8"));
5606
+ if (!launchName && infoPlistOutput && import_node_fs43.default.existsSync(infoPlistOutput)) {
5607
+ const info = import_plist3.default.parse(import_node_fs43.default.readFileSync(infoPlistOutput, "utf8"));
5396
5608
  const declared = isRecord(info) ? info.UILaunchStoryboardName : void 0;
5397
5609
  if (typeof declared === "string") launchName = expand(declared, settings);
5398
5610
  }
5399
5611
  const runtimeInterfaceFiles = interfaceFiles.filter(
5400
- (file) => import_node_path7.default.basename(file, import_node_path7.default.extname(file)) !== launchName
5612
+ (file) => import_node_path45.default.basename(file, import_node_path45.default.extname(file)) !== launchName
5401
5613
  );
5402
5614
  if (runtimeInterfaceFiles.length > 0)
5403
5615
  throw new Error(
@@ -5408,13 +5620,13 @@ ${output2}`
5408
5620
  }
5409
5621
  const interfaceOutputs = /* @__PURE__ */ new Set();
5410
5622
  for (const file of interfaceFiles) {
5411
- const localization = file.split(import_node_path7.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
5623
+ const localization = file.split(import_node_path45.default.sep).findLast((part) => part.endsWith(".lproj")) ?? "";
5412
5624
  const extension = file.endsWith(".storyboard") ? ".storyboardc" : ".nib";
5413
- const output2 = import_node_path7.default.join(
5625
+ const output2 = import_node_path45.default.join(
5414
5626
  settings("DERIVED_FILE_DIR"),
5415
5627
  "InterfaceBuilder",
5416
5628
  localization,
5417
- import_node_path7.default.basename(file, import_node_path7.default.extname(file)) + extension
5629
+ import_node_path45.default.basename(file, import_node_path45.default.extname(file)) + extension
5418
5630
  );
5419
5631
  if (interfaceOutputs.has(output2))
5420
5632
  throw new Error(`${targetName}: duplicate Interface Builder output ${output2}`);
@@ -5436,18 +5648,18 @@ ${output2}`
5436
5648
  const inputs = JSON.stringify({
5437
5649
  args,
5438
5650
  developer: settings("DEVELOPER_DIR"),
5439
- source: (0, import_node_crypto4.createHash)("sha256").update(import_node_fs4.default.readFileSync(file)).digest("hex")
5651
+ source: (0, import_node_crypto26.createHash)("sha256").update(import_node_fs43.default.readFileSync(file)).digest("hex")
5440
5652
  });
5441
- if (!import_node_fs4.default.existsSync(output2) || !import_node_fs4.default.existsSync(stamp) || import_node_fs4.default.readFileSync(stamp, "utf8") !== inputs) {
5442
- import_node_fs4.default.rmSync(output2, { recursive: true, force: true });
5443
- import_node_fs4.default.rmSync(stamp, { force: true });
5444
- import_node_fs4.default.mkdirSync(import_node_path7.default.dirname(output2), { recursive: true });
5445
- (0, import_node_child_process5.execFileSync)("xcrun", args, {
5653
+ if (!import_node_fs43.default.existsSync(output2) || !import_node_fs43.default.existsSync(stamp) || import_node_fs43.default.readFileSync(stamp, "utf8") !== inputs) {
5654
+ import_node_fs43.default.rmSync(output2, { recursive: true, force: true });
5655
+ import_node_fs43.default.rmSync(stamp, { force: true });
5656
+ import_node_fs43.default.mkdirSync(import_node_path45.default.dirname(output2), { recursive: true });
5657
+ (0, import_node_child_process24.execFileSync)("xcrun", args, {
5446
5658
  cwd: project.projectDir,
5447
5659
  stdio: ["ignore", "pipe", "pipe"],
5448
5660
  timeout: runScriptTimeoutMs
5449
5661
  });
5450
- import_node_fs4.default.writeFileSync(stamp, inputs);
5662
+ import_node_fs43.default.writeFileSync(stamp, inputs);
5451
5663
  }
5452
5664
  projectInputs.add(file);
5453
5665
  resources.delete(file);
@@ -5464,13 +5676,13 @@ ${output2}`
5464
5676
  for (const definition of definitions) {
5465
5677
  const configuredLanguage = settings("INTENTS_CODEGEN_LANGUAGE");
5466
5678
  const language = !configuredLanguage || configuredLanguage === "Automatic" ? sources.size > 0 ? "Swift" : "Objective-C" : configuredLanguage;
5467
- const output2 = import_node_path7.default.join(
5679
+ const output2 = import_node_path45.default.join(
5468
5680
  settings("DERIVED_FILE_DIR"),
5469
5681
  "IntentDefinitionGenerated",
5470
- import_node_path7.default.basename(definition, ".intentdefinition")
5682
+ import_node_path45.default.basename(definition, ".intentdefinition")
5471
5683
  );
5472
- import_node_fs4.default.rmSync(output2, { recursive: true, force: true });
5473
- import_node_fs4.default.mkdirSync(output2, { recursive: true });
5684
+ import_node_fs43.default.rmSync(output2, { recursive: true, force: true });
5685
+ import_node_fs43.default.mkdirSync(output2, { recursive: true });
5474
5686
  const args = [
5475
5687
  "intentbuilderc",
5476
5688
  "generate",
@@ -5489,20 +5701,20 @@ ${output2}`
5489
5701
  args.push("-swiftVersion", settings("SWIFT_VERSION") || "5.0");
5490
5702
  if (settings("DEFINES_MODULE") === "YES")
5491
5703
  args.push("-moduleName", settings("PRODUCT_MODULE_NAME"));
5492
- (0, import_node_child_process5.execFileSync)("xcrun", args, {
5704
+ (0, import_node_child_process24.execFileSync)("xcrun", args, {
5493
5705
  cwd: project.projectDir,
5494
5706
  stdio: ["ignore", "pipe", "pipe"],
5495
5707
  timeout: runScriptTimeoutMs
5496
5708
  });
5497
- const compiled = import_node_path7.default.join(
5709
+ const compiled = import_node_path45.default.join(
5498
5710
  settings("DERIVED_FILE_DIR"),
5499
5711
  "IntentDefinitionCompiled",
5500
- definition.split(import_node_path7.default.sep).findLast((part) => part.endsWith(".lproj")) ?? ""
5712
+ definition.split(import_node_path45.default.sep).findLast((part) => part.endsWith(".lproj")) ?? ""
5501
5713
  );
5502
- const compiledDefinition = import_node_path7.default.join(compiled, import_node_path7.default.basename(definition));
5503
- import_node_fs4.default.rmSync(compiledDefinition, { force: true });
5504
- import_node_fs4.default.mkdirSync(compiled, { recursive: true });
5505
- (0, import_node_child_process5.execFileSync)(
5714
+ const compiledDefinition = import_node_path45.default.join(compiled, import_node_path45.default.basename(definition));
5715
+ import_node_fs43.default.rmSync(compiledDefinition, { force: true });
5716
+ import_node_fs43.default.mkdirSync(compiled, { recursive: true });
5717
+ (0, import_node_child_process24.execFileSync)(
5506
5718
  "xcrun",
5507
5719
  [
5508
5720
  "intentbuilderc",
@@ -5542,37 +5754,37 @@ ${output2}`
5542
5754
  function commonAncestor(dirs) {
5543
5755
  let common = dirs[0];
5544
5756
  for (const dir of dirs) {
5545
- while (common !== import_node_path7.default.dirname(common) && import_node_path7.default.relative(common, dir).startsWith(".."))
5546
- common = import_node_path7.default.dirname(common);
5757
+ while (common !== import_node_path45.default.dirname(common) && import_node_path45.default.relative(common, dir).startsWith(".."))
5758
+ common = import_node_path45.default.dirname(common);
5547
5759
  }
5548
5760
  return common;
5549
5761
  }
5550
- var isPodsProject = (xcodeproj) => import_node_path7.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path7.default.basename(import_node_path7.default.dirname(xcodeproj)) === "Pods";
5762
+ var isPodsProject = (xcodeproj) => import_node_path45.default.basename(xcodeproj) === "Pods.xcodeproj" && import_node_path45.default.basename(import_node_path45.default.dirname(xcodeproj)) === "Pods";
5551
5763
  function installedPodsSandbox(pods) {
5552
- const podfileLock = import_node_path7.default.join(import_node_path7.default.dirname(pods), "Podfile.lock");
5553
- const manifestLock = import_node_path7.default.join(pods, "Manifest.lock");
5554
- if (!import_node_fs4.default.existsSync(podfileLock))
5764
+ const podfileLock = import_node_path45.default.join(import_node_path45.default.dirname(pods), "Podfile.lock");
5765
+ const manifestLock = import_node_path45.default.join(pods, "Manifest.lock");
5766
+ if (!import_node_fs43.default.existsSync(podfileLock))
5555
5767
  throw new Error(
5556
- `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path7.default.dirname(pods)}`
5768
+ `${pods} has no ${podfileLock}: run \`pod install\` in ${import_node_path45.default.dirname(pods)}`
5557
5769
  );
5558
- if (!import_node_fs4.default.existsSync(manifestLock) || !import_node_fs4.default.readFileSync(manifestLock).equals(import_node_fs4.default.readFileSync(podfileLock)))
5770
+ if (!import_node_fs43.default.existsSync(manifestLock) || !import_node_fs43.default.readFileSync(manifestLock).equals(import_node_fs43.default.readFileSync(podfileLock)))
5559
5771
  throw new Error(
5560
- `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path7.default.dirname(pods)}`
5772
+ `The sandbox is not in sync with the Podfile.lock: ${manifestLock} differs from ${podfileLock}. Run \`pod install\` in ${import_node_path45.default.dirname(pods)}`
5561
5773
  );
5562
5774
  const specChecksums = {};
5563
- const lines = import_node_fs4.default.readFileSync(manifestLock, "utf8").split("\n");
5775
+ const lines = import_node_fs43.default.readFileSync(manifestLock, "utf8").split("\n");
5564
5776
  const start = lines.indexOf("SPEC CHECKSUMS:");
5565
5777
  for (const line of start === -1 ? [] : lines.slice(start + 1)) {
5566
5778
  const entry = /^ {2}"?([^":]+)"?: ([0-9a-f]+)$/.exec(line);
5567
5779
  if (!entry) break;
5568
5780
  specChecksums[entry[1]] = entry[2];
5569
5781
  }
5570
- const specs = import_node_path7.default.join(pods, "Local Podspecs");
5782
+ const specs = import_node_path45.default.join(pods, "Local Podspecs");
5571
5783
  return {
5572
5784
  podfileLock,
5573
5785
  manifestLock,
5574
5786
  specChecksums,
5575
- localPodspecs: isDirectory(specs) ? import_node_fs4.default.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => import_node_path7.default.join(specs, name)) : []
5787
+ localPodspecs: isDirectory(specs) ? import_node_fs43.default.readdirSync(specs).filter((name) => name.endsWith(".podspec.json")).sort().map((name) => import_node_path45.default.join(specs, name)) : []
5576
5788
  };
5577
5789
  }
5578
5790
  function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
@@ -5584,14 +5796,14 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
5584
5796
  if (!xcodeProjectFile(xcodeproj)) {
5585
5797
  if (installedPods && isPodsProject(xcodeproj))
5586
5798
  throw new Error(
5587
- `${import_node_path7.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path7.default.dirname(import_node_path7.default.dirname(xcodeproj))}`
5799
+ `${import_node_path45.default.basename(xcodeprojOrWorkspace)} builds ${xcodeproj}, which is not installed: run \`pod install\` in ${import_node_path45.default.dirname(import_node_path45.default.dirname(xcodeproj))}`
5588
5800
  );
5589
5801
  return;
5590
5802
  }
5591
- const key = import_node_fs4.default.realpathSync.native(xcodeproj);
5592
- if (projectAt.has(key) || !installedPods && key.split(import_node_path7.default.sep).includes("Pods"))
5803
+ const key = import_node_fs43.default.realpathSync.native(xcodeproj);
5804
+ if (projectAt.has(key) || !installedPods && key.split(import_node_path45.default.sep).includes("Pods"))
5593
5805
  return;
5594
- if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path7.default.dirname(key));
5806
+ if (isPodsProject(key)) cocoapods = installedPodsSandbox(import_node_path45.default.dirname(key));
5595
5807
  const project = loadProject(key);
5596
5808
  projectAt.set(key, project);
5597
5809
  projects.push(project);
@@ -5607,12 +5819,12 @@ function workspaceProjects(xcodeprojOrWorkspace, installedPods = false) {
5607
5819
  for (const reference of listed)
5608
5820
  if (reference.endsWith(".xcodeproj")) addProject(reference);
5609
5821
  if (projects.length === 0) {
5610
- throw new Error(`${import_node_path7.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
5822
+ throw new Error(`${import_node_path45.default.basename(xcodeprojOrWorkspace)} lists no Xcode project`);
5611
5823
  }
5612
- const podfile = import_node_path7.default.join(import_node_path7.default.dirname(xcodeprojOrWorkspace), "Podfile");
5613
- if (installedPods && !cocoapods && import_node_fs4.default.existsSync(podfile))
5824
+ const podfile = import_node_path45.default.join(import_node_path45.default.dirname(xcodeprojOrWorkspace), "Podfile");
5825
+ if (installedPods && !cocoapods && import_node_fs43.default.existsSync(podfile))
5614
5826
  throw new Error(
5615
- `${podfile} is not installed into ${import_node_path7.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path7.default.dirname(podfile)} and open the workspace it writes`
5827
+ `${podfile} is not installed into ${import_node_path45.default.basename(xcodeprojOrWorkspace)}: run \`pod install\` in ${import_node_path45.default.dirname(podfile)} and open the workspace it writes`
5616
5828
  );
5617
5829
  return { listed, projects, projectAt, cocoapods };
5618
5830
  }
@@ -5650,7 +5862,7 @@ function listXcodeAppTargets(xcodeprojOrWorkspace, options = {}) {
5650
5862
  return workspaceProjects(xcodeprojOrWorkspace).projects.flatMap(projectTargets).filter((ref) => isIosAppTarget(ref, options)).map((ref) => str(ref.target.name) ?? ref.id);
5651
5863
  }
5652
5864
  function defaultXcodeAppTarget(xcodeproj) {
5653
- const project = loadProject(import_node_fs4.default.realpathSync.native(xcodeproj));
5865
+ const project = loadProject(import_node_fs43.default.realpathSync.native(xcodeproj));
5654
5866
  for (const [id, target] of Object.entries(project.objects)) {
5655
5867
  if (!isDict(target) || target.isa !== "PBXNativeTarget") continue;
5656
5868
  if (isIosAppTarget({ project, id, target }, { requireSources: false }))
@@ -5658,30 +5870,30 @@ function defaultXcodeAppTarget(xcodeproj) {
5658
5870
  }
5659
5871
  }
5660
5872
  function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
5661
- const container = import_node_fs4.default.realpathSync.native(xcodeprojOrWorkspace);
5873
+ const container = import_node_fs43.default.realpathSync.native(xcodeprojOrWorkspace);
5662
5874
  const { projects } = workspaceProjects(container);
5663
5875
  const containers = [
5664
5876
  .../* @__PURE__ */ new Set([container, ...projects.map((project2) => project2.xcodeproj)])
5665
5877
  ];
5666
5878
  const found = containers.flatMap(
5667
5879
  (dir) => [
5668
- import_node_path7.default.join(dir, "xcshareddata"),
5669
- ...isDirectory(import_node_path7.default.join(dir, "xcuserdata")) ? import_node_fs4.default.readdirSync(import_node_path7.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path7.default.join(dir, "xcuserdata", user)) : []
5880
+ import_node_path45.default.join(dir, "xcshareddata"),
5881
+ ...isDirectory(import_node_path45.default.join(dir, "xcuserdata")) ? import_node_fs43.default.readdirSync(import_node_path45.default.join(dir, "xcuserdata")).sort().map((user) => import_node_path45.default.join(dir, "xcuserdata", user)) : []
5670
5882
  ].map((data) => ({
5671
5883
  dir,
5672
- file: import_node_path7.default.join(data, "xcschemes", `${scheme}.xcscheme`)
5884
+ file: import_node_path45.default.join(data, "xcschemes", `${scheme}.xcscheme`)
5673
5885
  }))
5674
- ).find((candidate) => import_node_fs4.default.existsSync(candidate.file));
5886
+ ).find((candidate) => import_node_fs43.default.existsSync(candidate.file));
5675
5887
  if (!found) {
5676
5888
  const known = containers.flatMap(
5677
- (dir) => import_node_fs4.default.existsSync(import_node_path7.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs4.default.readdirSync(import_node_path7.default.join(dir, "xcshareddata", "xcschemes")).filter((name2) => name2.endsWith(".xcscheme")).map((name2) => name2.slice(0, -".xcscheme".length)).sort() : []
5889
+ (dir) => import_node_fs43.default.existsSync(import_node_path45.default.join(dir, "xcshareddata", "xcschemes")) ? import_node_fs43.default.readdirSync(import_node_path45.default.join(dir, "xcshareddata", "xcschemes")).filter((name2) => name2.endsWith(".xcscheme")).map((name2) => name2.slice(0, -".xcscheme".length)).sort() : []
5678
5890
  );
5679
5891
  throw new Error(
5680
- `${import_node_path7.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
5892
+ `${import_node_path45.default.basename(container)} has no scheme ${scheme}; it shares ${known.join(", ") || "none"}`
5681
5893
  );
5682
5894
  }
5683
5895
  const launch = /<LaunchAction\b([^>]*)>([\s\S]*?)<\/LaunchAction>/.exec(
5684
- import_node_fs4.default.readFileSync(found.file, "utf8")
5896
+ import_node_fs43.default.readFileSync(found.file, "utf8")
5685
5897
  );
5686
5898
  const attribute = (text2, name2) => {
5687
5899
  const value = new RegExp(`\\b${name2}\\s*=\\s*"([^"]*)"`).exec(text2)?.[1];
@@ -5694,12 +5906,12 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
5694
5906
  if (!configuration || !blueprint || !referenced?.startsWith("container:")) {
5695
5907
  throw new Error(`scheme ${scheme} runs no application target`);
5696
5908
  }
5697
- const projectPath = import_node_path7.default.resolve(
5698
- import_node_path7.default.dirname(found.dir),
5909
+ const projectPath = import_node_path45.default.resolve(
5910
+ import_node_path45.default.dirname(found.dir),
5699
5911
  referenced.slice("container:".length)
5700
5912
  );
5701
5913
  const project = projects.find(
5702
- (candidate) => import_node_fs4.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs4.default.realpathSync.native(projectPath)
5914
+ (candidate) => import_node_fs43.default.existsSync(projectPath) && candidate.xcodeproj === import_node_fs43.default.realpathSync.native(projectPath)
5703
5915
  );
5704
5916
  const target = project && projectTargets(project).find((ref) => ref.id === blueprint);
5705
5917
  const name = target && str(target.target.name);
@@ -5719,31 +5931,31 @@ function readXcodeScheme(xcodeprojOrWorkspace, scheme) {
5719
5931
  var NativeAppTargetSelectionError = class extends Error {
5720
5932
  };
5721
5933
  function selectIosAppTarget(projectRoot, iosTarget) {
5722
- const nested = import_node_path7.default.join(projectRoot, "ios");
5723
- const iosRoot = import_node_fs4.default.existsSync(nested) ? nested : projectRoot;
5724
- const entries = import_node_fs4.default.readdirSync(iosRoot, { withFileTypes: true });
5934
+ const nested = import_node_path45.default.join(projectRoot, "ios");
5935
+ const iosRoot = import_node_fs43.default.existsSync(nested) ? nested : projectRoot;
5936
+ const entries = import_node_fs43.default.readdirSync(iosRoot, { withFileTypes: true });
5725
5937
  const projects = (entries.some((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")) ? entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcodeproj")).map((entry) => ({
5726
- xcodeproj: import_node_path7.default.join(iosRoot, entry.name),
5938
+ xcodeproj: import_node_path45.default.join(iosRoot, entry.name),
5727
5939
  workspace: null
5728
5940
  })) : entries.filter((entry) => entry.isDirectory() && entry.name.endsWith(".xcworkspace")).flatMap((entry) => {
5729
- const workspace = import_node_path7.default.join(iosRoot, entry.name);
5941
+ const workspace = import_node_path45.default.join(iosRoot, entry.name);
5730
5942
  return workspaceReferences(workspace).map((xcodeproj2) => ({
5731
5943
  xcodeproj: xcodeproj2,
5732
5944
  workspace
5733
5945
  }));
5734
5946
  }).filter(
5735
- ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path7.default.sep).includes("Pods") && import_node_fs4.default.existsSync(xcodeproj2)
5947
+ ({ xcodeproj: xcodeproj2 }) => xcodeproj2.endsWith(".xcodeproj") && !xcodeproj2.split(import_node_path45.default.sep).includes("Pods") && import_node_fs43.default.existsSync(xcodeproj2)
5736
5948
  ).filter(
5737
5949
  ({ xcodeproj: xcodeproj2 }) => listXcodeAppTargets(xcodeproj2, { requireSources: false }).length > 0
5738
5950
  )).map(({ xcodeproj: xcodeproj2, workspace }) => ({
5739
5951
  xcodeproj: xcodeproj2,
5740
5952
  workspace,
5741
- name: import_node_path7.default.basename(xcodeproj2)
5953
+ name: import_node_path45.default.basename(xcodeproj2)
5742
5954
  }));
5743
5955
  if (projects.length === 0) return null;
5744
5956
  if (projects.length > 1 && !iosTarget) {
5745
5957
  throw new NativeAppTargetSelectionError(
5746
- `native app identity requires a selected Xcode project; set withPeach's iosTarget to an app target in one of: ${projects.map((entry) => entry.name).join(", ")}`
5958
+ `native app identity requires a selected Xcode project; pass --ios-target with an app target in one of: ${projects.map((entry) => entry.name).join(", ")}`
5747
5959
  );
5748
5960
  }
5749
5961
  let project = projects[0];
@@ -5777,13 +5989,13 @@ function selectIosAppTarget(projectRoot, iosTarget) {
5777
5989
  if (!target) throw new Error("native app identity has no iOS application target");
5778
5990
  if (!iosTarget) {
5779
5991
  const workspace = xcodeproj.replace(/\.xcodeproj$/, ".xcworkspace");
5780
- const container = import_node_fs4.default.existsSync(workspace) ? workspace : xcodeproj;
5992
+ const container = import_node_fs43.default.existsSync(workspace) ? workspace : xcodeproj;
5781
5993
  const hasScheme = [container, xcodeproj].some((dir) => {
5782
- if (import_node_fs4.default.existsSync(import_node_path7.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
5994
+ if (import_node_fs43.default.existsSync(import_node_path45.default.join(dir, "xcshareddata", "xcschemes", `${target}.xcscheme`)))
5783
5995
  return true;
5784
- const users = import_node_path7.default.join(dir, "xcuserdata");
5785
- return import_node_fs4.default.existsSync(users) && import_node_fs4.default.readdirSync(users).some(
5786
- (user) => import_node_fs4.default.existsSync(import_node_path7.default.join(users, user, "xcschemes", `${target}.xcscheme`))
5996
+ const users = import_node_path45.default.join(dir, "xcuserdata");
5997
+ return import_node_fs43.default.existsSync(users) && import_node_fs43.default.readdirSync(users).some(
5998
+ (user) => import_node_fs43.default.existsSync(import_node_path45.default.join(users, user, "xcschemes", `${target}.xcscheme`))
5787
5999
  );
5788
6000
  });
5789
6001
  if (hasScheme) target = readXcodeScheme(container, target).target;
@@ -5794,8 +6006,8 @@ function selectIosAppTarget(projectRoot, iosTarget) {
5794
6006
  );
5795
6007
  return { xcodeproj, target, workspace: project.workspace };
5796
6008
  }
5797
- var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path7.default.join(
5798
- xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path7.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
6009
+ var workspaceResolvedFile = (xcodeprojOrWorkspace) => import_node_path45.default.join(
6010
+ xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : import_node_path45.default.join(xcodeprojOrWorkspace, "project.xcworkspace"),
5799
6011
  "xcshareddata",
5800
6012
  "swiftpm",
5801
6013
  "Package.resolved"
@@ -5812,7 +6024,7 @@ var SwiftPackageResolutionRequired = class extends Error {
5812
6024
  function readXcodeAppTarget(input, targetName, configurationName, options = {}) {
5813
6025
  if (isBazelPackage(input))
5814
6026
  return readBazelAppTarget(input, targetName, configurationName, options);
5815
- const xcodeprojOrWorkspace = import_node_fs4.default.realpathSync.native(input);
6027
+ const xcodeprojOrWorkspace = import_node_fs43.default.realpathSync.native(input);
5816
6028
  const workspace = xcodeprojOrWorkspace.endsWith(".xcworkspace") ? xcodeprojOrWorkspace : null;
5817
6029
  const { listed, projects, projectAt, cocoapods } = workspaceProjects(
5818
6030
  xcodeprojOrWorkspace,
@@ -5823,7 +6035,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5823
6035
  (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
5824
6036
  );
5825
6037
  const appTargetNames = appTargets.map((ref) => str(ref.target.name) ?? ref.id);
5826
- const container = import_node_path7.default.basename(xcodeprojOrWorkspace);
6038
+ const container = import_node_path45.default.basename(xcodeprojOrWorkspace);
5827
6039
  const named = targetName ? appTargets.filter((ref) => ref.target.name === targetName) : appTargets;
5828
6040
  if (named.length !== 1) {
5829
6041
  if (options.frameworkMachOType)
@@ -5848,15 +6060,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5848
6060
  for (const ref of allTargets) {
5849
6061
  const product = ref.project.object(str(ref.target.productReference));
5850
6062
  const file = str(product?.path);
5851
- if (file && !byProduct.has(import_node_path7.default.basename(file)))
5852
- byProduct.set(import_node_path7.default.basename(file), ref);
6063
+ if (file && !byProduct.has(import_node_path45.default.basename(file)))
6064
+ byProduct.set(import_node_path45.default.basename(file), ref);
5853
6065
  }
5854
6066
  const proxied = (project, proxyId) => {
5855
6067
  const proxy = project.object(proxyId);
5856
6068
  if (proxy?.isa !== "PBXContainerItemProxy") return void 0;
5857
6069
  const portal = str(proxy.containerPortal);
5858
6070
  const portalPath = project.resolvePath(portal ?? "");
5859
- const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs4.default.existsSync(portalPath) ? projectAt.get(import_node_fs4.default.realpathSync.native(portalPath)) : void 0;
6071
+ const owner = project.object(portal)?.isa === "PBXProject" ? project : portalPath && import_node_fs43.default.existsSync(portalPath) ? projectAt.get(import_node_fs43.default.realpathSync.native(portalPath)) : void 0;
5860
6072
  const remote = str(proxy.remoteGlobalIDString);
5861
6073
  if (!owner || !remote) return void 0;
5862
6074
  return projectTargets(owner).find(
@@ -5873,7 +6085,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5873
6085
  const buildFile = project.object(buildFileId);
5874
6086
  if (!buildFile || !xcodeBuildFileBuildsForIos(buildFile)) continue;
5875
6087
  const file = project.object(str(buildFile.fileRef));
5876
- const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path7.default.basename(str(file.path) ?? "")) : void 0;
6088
+ const resolved = file?.isa === "PBXReferenceProxy" ? proxied(project, str(file.remoteRef)) : file && str(file.sourceTree) === "BUILT_PRODUCTS_DIR" ? byProduct.get(import_node_path45.default.basename(str(file.path) ?? "")) : void 0;
5877
6089
  if (resolved)
5878
6090
  found.push({
5879
6091
  target: resolved,
@@ -5954,7 +6166,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5954
6166
  const otherProduct = productName(other);
5955
6167
  for (const { file, visibility } of headerPhase(other)) {
5956
6168
  if (visibility === "Project") continue;
5957
- const key = `${otherProduct}/${import_node_path7.default.basename(file)}`;
6169
+ const key = `${otherProduct}/${import_node_path45.default.basename(file)}`;
5958
6170
  if (!headers.has(key)) headers.set(key, file);
5959
6171
  }
5960
6172
  }
@@ -5984,8 +6196,8 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
5984
6196
  ref.project.visitMembers(
5985
6197
  ref.id,
5986
6198
  ref.project.resolvePath,
5987
- (file) => isDirectory(file) ? walkFiles(file) : import_node_fs4.default.existsSync(file) ? [file] : [],
5988
- import_node_path7.default.join,
6199
+ (file) => isDirectory(file) ? walkFiles(file) : import_node_fs43.default.existsSync(file) ? [file] : [],
6200
+ import_node_path45.default.join,
5989
6201
  (file, kind) => {
5990
6202
  if (kind === "header") found.push(file);
5991
6203
  }
@@ -6001,12 +6213,12 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6001
6213
  for (const ref of projectTargets(project)) {
6002
6214
  const product = productName(ref);
6003
6215
  for (const { file, visibility } of headerPhase(ref)) {
6004
- const name = import_node_path7.default.basename(file);
6216
+ const name = import_node_path45.default.basename(file);
6005
6217
  if (!entries.has(name))
6006
6218
  entries.set(name, visibility !== "Project" ? `${product}/${name}` : file);
6007
6219
  }
6008
6220
  for (const file of synchronizedHeaders(ref)) {
6009
- const name = import_node_path7.default.basename(file);
6221
+ const name = import_node_path45.default.basename(file);
6010
6222
  if (!entries.has(name)) entries.set(name, file);
6011
6223
  }
6012
6224
  }
@@ -6016,7 +6228,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6016
6228
  if (folder === null) continue;
6017
6229
  for (const file of walkFiles(folder)) {
6018
6230
  if (!HEADER_FILE.test(file)) continue;
6019
- const name = import_node_path7.default.basename(file);
6231
+ const name = import_node_path45.default.basename(file);
6020
6232
  if (!entries.has(name)) entries.set(name, file);
6021
6233
  }
6022
6234
  }
@@ -6024,18 +6236,18 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6024
6236
  for (const id of Object.keys(project.objects)) {
6025
6237
  if (project.object(id)?.isa !== "PBXFileReference") continue;
6026
6238
  const file = project.resolvePath(id);
6027
- if (file && HEADER_FILE.test(file) && !entries.has(import_node_path7.default.basename(file)))
6028
- entries.set(import_node_path7.default.basename(file), file);
6239
+ if (file && HEADER_FILE.test(file) && !entries.has(import_node_path45.default.basename(file)))
6240
+ entries.set(import_node_path45.default.basename(file), file);
6029
6241
  }
6030
6242
  const map = [...entries];
6031
6243
  projectHeaderMaps.set(project, map);
6032
6244
  return map;
6033
6245
  };
6034
6246
  const xcconfigs = /* @__PURE__ */ new Set();
6035
- const buildDir = (project) => import_node_path7.default.join(project.projectDir, ".build/peach-xcode/Build");
6247
+ const buildDir = (project) => import_node_path45.default.join(project.projectDir, ".build/peach-xcode/Build");
6036
6248
  const workspaceBuild = {
6037
- SYMROOT: import_node_path7.default.join(buildDir(app.project), "Products"),
6038
- OBJROOT: import_node_path7.default.join(buildDir(app.project), "Intermediates.noindex")
6249
+ SYMROOT: import_node_path45.default.join(buildDir(app.project), "Products"),
6250
+ OBJROOT: import_node_path45.default.join(buildDir(app.project), "Intermediates.noindex")
6039
6251
  };
6040
6252
  const moduleTarget = (ref) => {
6041
6253
  const name = str(ref.target.name) ?? ref.id;
@@ -6050,16 +6262,16 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6050
6262
  TARGET_NAME: name,
6051
6263
  TARGETNAME: "$(TARGET_NAME)",
6052
6264
  PROJECT: "$(PROJECT_NAME)",
6053
- PROJECT_NAME: import_node_path7.default.basename(ref.project.xcodeproj, ".xcodeproj"),
6265
+ PROJECT_NAME: import_node_path45.default.basename(ref.project.xcodeproj, ".xcodeproj"),
6054
6266
  PROJECT_CLASS_PREFIX: isDict(ref.project.project.attributes) ? str(ref.project.project.attributes.CLASSPREFIX) ?? "" : "",
6055
6267
  PROJECT_FILE_PATH: ref.project.xcodeproj,
6056
6268
  SRCROOT: ref.project.projectDir,
6057
6269
  SOURCE_ROOT: ref.project.projectDir,
6058
6270
  PROJECT_DIR: ref.project.projectDir,
6059
- SYMROOT: import_node_path7.default.join(buildDir(ref.project), "Products"),
6271
+ SYMROOT: import_node_path45.default.join(buildDir(ref.project), "Products"),
6060
6272
  BUILD_DIR: "$(SYMROOT)",
6061
6273
  BUILD_ROOT: "$(SYMROOT)",
6062
- OBJROOT: import_node_path7.default.join(buildDir(ref.project), "Intermediates.noindex"),
6274
+ OBJROOT: import_node_path45.default.join(buildDir(ref.project), "Intermediates.noindex"),
6063
6275
  CONFIGURATION_BUILD_DIR: "$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
6064
6276
  BUILT_PRODUCTS_DIR: "$(CONFIGURATION_BUILD_DIR)",
6065
6277
  TARGET_BUILD_DIR: "$(CONFIGURATION_BUILD_DIR)",
@@ -6108,7 +6320,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6108
6320
  xcconfigs
6109
6321
  );
6110
6322
  const searchRules = recursiveSearchRules(settings2);
6111
- const absolute = (file) => import_node_path7.default.resolve(ref.project.projectDir, file);
6323
+ const absolute = (file) => import_node_path45.default.resolve(ref.project.projectDir, file);
6112
6324
  const framework = FRAMEWORK_PRODUCTS.has(str(ref.target.productType) ?? "");
6113
6325
  const product = settings2("PRODUCT_NAME");
6114
6326
  const moduleName = applyOperator(settings2("PRODUCT_MODULE_NAME"), "c99extidentifier");
@@ -6139,7 +6351,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6139
6351
  `${name}: Swift compatibility header phase has no Swift producer sources`
6140
6352
  );
6141
6353
  const building = options.prepareGeneratedSources && options.requireSources !== false;
6142
- const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path7.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
6354
+ const versioning = building && allSources.length > 0 && settings2("VERSIONING_SYSTEM") === "apple-generic" ? import_node_path45.default.join(settings2("DERIVED_FILE_DIR"), `${product}_vers.c`) : null;
6143
6355
  if (versioning) {
6144
6356
  const version = settings2("CURRENT_PROJECT_VERSION");
6145
6357
  const custom = [
@@ -6152,7 +6364,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6152
6364
  ].filter((key) => settings2(key));
6153
6365
  if (custom.length)
6154
6366
  throw new Error(
6155
- `${name}: Xcode generates ${import_node_path7.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
6367
+ `${name}: Xcode generates ${import_node_path45.default.basename(versioning)} with ${custom.join(", ")}; peach does not model VERSION_INFO_* overrides`
6156
6368
  );
6157
6369
  const symbol = product.replace(/^[^A-Za-z_]/, "_").replace(/[^A-Za-z0-9_]/g, "_");
6158
6370
  const [major, minor] = version.split(".");
@@ -6165,9 +6377,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6165
6377
  ` const double ${symbol}VersionNumber __attribute__ ((used)) = (double)${number2};`,
6166
6378
  ""
6167
6379
  ].join("\n");
6168
- if (!import_node_fs4.default.existsSync(versioning) || import_node_fs4.default.readFileSync(versioning, "utf8") !== unit) {
6169
- import_node_fs4.default.mkdirSync(import_node_path7.default.dirname(versioning), { recursive: true });
6170
- import_node_fs4.default.writeFileSync(versioning, unit);
6380
+ if (!import_node_fs43.default.existsSync(versioning) || import_node_fs43.default.readFileSync(versioning, "utf8") !== unit) {
6381
+ import_node_fs43.default.mkdirSync(import_node_path45.default.dirname(versioning), { recursive: true });
6382
+ import_node_fs43.default.writeFileSync(versioning, unit);
6171
6383
  }
6172
6384
  allSources.push(versioning);
6173
6385
  }
@@ -6186,7 +6398,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6186
6398
  const headerFiles = headerPhase(ref);
6187
6399
  const ownHeaders = /* @__PURE__ */ new Map();
6188
6400
  for (const { file, visibility } of headerFiles) {
6189
- const name2 = import_node_path7.default.basename(file);
6401
+ const name2 = import_node_path45.default.basename(file);
6190
6402
  const published = visibility !== "Project";
6191
6403
  if (!ownHeaders.has(name2))
6192
6404
  ownHeaders.set(name2, published ? `${product}/${name2}` : file);
@@ -6194,27 +6406,27 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6194
6406
  ownHeaders.set(`${product}/${name2}`, file);
6195
6407
  }
6196
6408
  for (const file of synchronizedHeaders(ref)) {
6197
- const name2 = import_node_path7.default.basename(file);
6409
+ const name2 = import_node_path45.default.basename(file);
6198
6410
  if (ownHeaders.has(name2)) continue;
6199
6411
  ownHeaders.set(name2, file);
6200
6412
  const qualified = `${product}/${name2}`;
6201
6413
  if (!ownHeaders.has(qualified)) ownHeaders.set(qualified, file);
6202
6414
  }
6203
6415
  const nonFrameworkHeaders = nonFrameworkHeadersOf(ref.project);
6204
- const wrapper = import_node_path7.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
6416
+ const wrapper = import_node_path45.default.join(settings2("BUILT_PRODUCTS_DIR"), `${product}.framework`);
6205
6417
  const moduleMap = (settings2("DEFINES_MODULE") === "YES" || !framework) && settings2("MODULEMAP_FILE") ? absolute(settings2("MODULEMAP_FILE")) : null;
6206
- const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path7.default.join(import_node_path7.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
6207
- const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs4.default.existsSync(moduleMap) && import_node_fs4.default.existsSync(frameworkUmbrella) ? {
6418
+ const frameworkUmbrella = !compatibility && framework && members.sources.length > 0 && moduleMap ? import_node_path45.default.join(import_node_path45.default.dirname(moduleMap), `${moduleName}-umbrella.h`) : null;
6419
+ const frameworkCompatibility = frameworkUmbrella && moduleMap && import_node_fs43.default.existsSync(moduleMap) && import_node_fs43.default.existsSync(frameworkUmbrella) ? {
6208
6420
  framework: true,
6209
6421
  moduleMap,
6210
6422
  umbrella: frameworkUmbrella,
6211
- outputModuleMap: import_node_path7.default.join(wrapper, "Modules", "module.modulemap"),
6212
- outputUmbrella: import_node_path7.default.join(
6423
+ outputModuleMap: import_node_path45.default.join(wrapper, "Modules", "module.modulemap"),
6424
+ outputUmbrella: import_node_path45.default.join(
6213
6425
  wrapper,
6214
6426
  "Headers",
6215
- import_node_path7.default.basename(frameworkUmbrella)
6427
+ import_node_path45.default.basename(frameworkUmbrella)
6216
6428
  ),
6217
- outputHeader: import_node_path7.default.join(
6429
+ outputHeader: import_node_path45.default.join(
6218
6430
  wrapper,
6219
6431
  "Headers",
6220
6432
  settings2("SWIFT_OBJC_INTERFACE_HEADER_NAME") || `${moduleName}-Swift.h`
@@ -6228,10 +6440,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6228
6440
  outputUmbrella: compatibility.outputUmbrella,
6229
6441
  outputHeader: compatibility.outputHeader
6230
6442
  } : frameworkCompatibility;
6231
- const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path7.default.relative(import_node_path7.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path7.default.sep)[0] !== ".." && import_node_fs4.default.existsSync(moduleMap) ? import_node_fs4.default.readdirSync(import_node_path7.default.dirname(moduleMap)).flatMap((entry) => {
6443
+ const podHeaders = !framework && isPodsProject(ref.project.xcodeproj) && moduleMap && import_node_path45.default.relative(import_node_path45.default.join(ref.project.projectDir, "Headers", "Public"), moduleMap).split(import_node_path45.default.sep)[0] !== ".." && import_node_fs43.default.existsSync(moduleMap) ? import_node_fs43.default.readdirSync(import_node_path45.default.dirname(moduleMap)).flatMap((entry) => {
6232
6444
  if (!/\.(h|hh|hpp|hxx|modulemap)$/.test(entry)) return [];
6233
- const file = import_node_path7.default.join(import_node_path7.default.dirname(moduleMap), entry);
6234
- return import_node_fs4.default.existsSync(file) ? [file] : [];
6445
+ const file = import_node_path45.default.join(import_node_path45.default.dirname(moduleMap), entry);
6446
+ return import_node_fs43.default.existsSync(file) ? [file] : [];
6235
6447
  }) : [];
6236
6448
  const fileFlags = {};
6237
6449
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -6312,15 +6524,15 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6312
6524
  // xcode searches its products' include directory before
6313
6525
  // HEADER_SEARCH_PATHS and the target's derived sources after.
6314
6526
  headerSearchPaths: [
6315
- import_node_path7.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
6527
+ import_node_path45.default.join(settings2("BUILT_PRODUCTS_DIR"), "include"),
6316
6528
  ...settingList(settings2("HEADER_SEARCH_PATHS")).flatMap(
6317
6529
  (raw) => expandSearchPath(absolute(raw), searchRules)
6318
6530
  ),
6319
- import_node_path7.default.join(
6531
+ import_node_path45.default.join(
6320
6532
  `${settings2("DERIVED_FILE_DIR")}-normal`,
6321
6533
  settings2("CURRENT_ARCH")
6322
6534
  ),
6323
- import_node_path7.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
6535
+ import_node_path45.default.join(settings2("DERIVED_FILE_DIR"), settings2("CURRENT_ARCH")),
6324
6536
  settings2("DERIVED_FILE_DIR")
6325
6537
  ],
6326
6538
  userHeaderSearchPaths: settingList(
@@ -6370,10 +6582,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6370
6582
  ...headerFiles.flatMap(
6371
6583
  ({ file, visibility }) => visibility === "Project" ? [] : [
6372
6584
  [
6373
- import_node_path7.default.join(
6585
+ import_node_path45.default.join(
6374
6586
  wrapper,
6375
6587
  visibility === "Public" ? "Headers" : "PrivateHeaders",
6376
- import_node_path7.default.basename(file)
6588
+ import_node_path45.default.basename(file)
6377
6589
  ),
6378
6590
  file
6379
6591
  ]
@@ -6387,7 +6599,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6387
6599
  return [];
6388
6600
  const destination = expand(
6389
6601
  str(phase.dstPath) ?? "",
6390
- (name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path7.default.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path7.default.join(wrapper, "PrivateHeaders") : settings2(name2)
6602
+ (name2) => name2 === "PUBLIC_HEADERS_FOLDER_PATH" ? import_node_path45.default.join(wrapper, "Headers") : name2 === "PRIVATE_HEADERS_FOLDER_PATH" ? import_node_path45.default.join(wrapper, "PrivateHeaders") : settings2(name2)
6391
6603
  );
6392
6604
  return list(phase.files).flatMap((id) => {
6393
6605
  const file = ref.project.resolvePath(
@@ -6395,17 +6607,17 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6395
6607
  );
6396
6608
  return file && HEADER_FILE.test(file) ? [
6397
6609
  [
6398
- import_node_path7.default.resolve(
6610
+ import_node_path45.default.resolve(
6399
6611
  settings2("BUILT_PRODUCTS_DIR"),
6400
6612
  destination,
6401
- import_node_path7.default.basename(file)
6613
+ import_node_path45.default.basename(file)
6402
6614
  ),
6403
6615
  file
6404
6616
  ]
6405
6617
  ] : [];
6406
6618
  });
6407
6619
  }),
6408
- ...moduleMap ? [[import_node_path7.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
6620
+ ...moduleMap ? [[import_node_path45.default.join(wrapper, "Modules", "module.modulemap"), moduleMap]] : []
6409
6621
  ]) : Object.fromEntries([
6410
6622
  ...podHeaders.map((file) => [file, file]),
6411
6623
  ...moduleMap ? [[moduleMap, moduleMap]] : []
@@ -6442,7 +6654,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6442
6654
  const frameworkTargets = selectedTargets.filter((target) => target !== builtTargets.at(-1)).filter(({ ref }) => MODULE_PRODUCTS.has(str(ref.target.productType) ?? "")).map(({ ref, module: module3 }) => ({ ref, framework: module3 }));
6443
6655
  const frameworks = frameworkTargets.map(({ framework }) => framework);
6444
6656
  const podSourceDirs = builtTargets.slice(0, -1).flatMap(
6445
- ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path7.default.dirname(file)).filter((dir) => import_node_fs4.default.existsSync(dir)) : []
6657
+ ({ ref, module: module3 }) => isPodsProject(ref.project.xcodeproj) ? [...module3.allSources, ...module3.objc?.headers ?? []].map((file) => import_node_path45.default.dirname(file)).filter((dir) => import_node_fs43.default.existsSync(dir)) : []
6446
6658
  );
6447
6659
  const expandValue = (value, settings2) => {
6448
6660
  if (typeof value === "string") return expand(value, settings2);
@@ -6463,7 +6675,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6463
6675
  const phase = owner.ref.project.object(phaseId);
6464
6676
  if (phase?.isa !== "PBXShellScriptBuildPhase" || str(phase.name) !== "[CP] Copy Pods Resources")
6465
6677
  continue;
6466
- const absolute = (raw) => import_node_path7.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
6678
+ const absolute = (raw) => import_node_path45.default.resolve(owner.ref.project.projectDir, expand(raw, owner.settings));
6467
6679
  const entries = (paths) => paths.flatMap((raw) => {
6468
6680
  const file = absolute(raw);
6469
6681
  xcconfigs.add(file);
@@ -6479,7 +6691,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6479
6691
  ].filter((file) => file.endsWith(".bundle"));
6480
6692
  if (inputs.length !== outputs.length)
6481
6693
  throw new Error(`${owner.module.name}: resource bundle copy lists differ`);
6482
- const destinationRoot = import_node_path7.default.join(
6694
+ const destinationRoot = import_node_path45.default.join(
6483
6695
  owner.settings("TARGET_BUILD_DIR"),
6484
6696
  owner.settings("UNLOCALIZED_RESOURCES_FOLDER_PATH")
6485
6697
  );
@@ -6488,24 +6700,24 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6488
6700
  const file = str(
6489
6701
  target.ref.project.object(str(target.ref.target.productReference))?.path
6490
6702
  );
6491
- return file && import_node_path7.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
6703
+ return file && import_node_path45.default.join(target.settings("TARGET_BUILD_DIR"), file) === input2;
6492
6704
  });
6493
6705
  if (!product && !isDirectory(input2))
6494
6706
  throw new Error(
6495
6707
  `${owner.module.name}: resource bundle input has no selected producer: ${input2}`
6496
6708
  );
6497
- const destination = import_node_path7.default.relative(destinationRoot, outputs[index]);
6498
- if (destination === ".." || destination.startsWith(`..${import_node_path7.default.sep}`) || import_node_path7.default.isAbsolute(destination) || import_node_path7.default.basename(input2) !== import_node_path7.default.basename(destination))
6709
+ const destination = import_node_path45.default.relative(destinationRoot, outputs[index]);
6710
+ if (destination === ".." || destination.startsWith(`..${import_node_path45.default.sep}`) || import_node_path45.default.isAbsolute(destination) || import_node_path45.default.basename(input2) !== import_node_path45.default.basename(destination))
6499
6711
  throw new Error(
6500
6712
  `${owner.module.name}: invalid resource bundle copy destination`
6501
6713
  );
6502
- const infoFile = product ? import_node_path7.default.resolve(
6714
+ const infoFile = product ? import_node_path45.default.resolve(
6503
6715
  product.ref.project.projectDir,
6504
6716
  product.settings("INFOPLIST_FILE")
6505
6717
  ) : null;
6506
6718
  if (infoFile) xcconfigs.add(infoFile);
6507
6719
  const prefix = owner.ref === app ? "" : `Frameworks/${owner.module.moduleName}.framework/`;
6508
- const bundlePath = prefix + destination.split(import_node_path7.default.sep).join("/");
6720
+ const bundlePath = prefix + destination.split(import_node_path45.default.sep).join("/");
6509
6721
  if (resourceProducts.some((resource) => resource.path === bundlePath))
6510
6722
  throw new Error(
6511
6723
  `${owner.module.name}: duplicate resource bundle destination ${bundlePath}`
@@ -6516,22 +6728,22 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6516
6728
  resources: product.module.resources,
6517
6729
  infoPlist: import_plist3.default.build(
6518
6730
  expandValue(
6519
- import_plist3.default.parse(import_node_fs4.default.readFileSync(infoFile, "utf8")),
6731
+ import_plist3.default.parse(import_node_fs43.default.readFileSync(infoFile, "utf8")),
6520
6732
  product.settings
6521
6733
  )
6522
6734
  )
6523
6735
  } : {
6524
- resources: import_node_fs4.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path7.default.join(entry.parentPath, entry.name)).sort(),
6736
+ resources: import_node_fs43.default.readdirSync(input2, { recursive: true, withFileTypes: true }).filter((entry) => entry.isFile()).map((entry) => import_node_path45.default.join(entry.parentPath, entry.name)).sort(),
6525
6737
  sourceRoot: input2
6526
6738
  }
6527
6739
  });
6528
6740
  }
6529
6741
  }
6530
6742
  }
6531
- const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path7.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
6532
- const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path7.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
6743
+ const infoPlistFile = settings("INFOPLIST_FILE") ? import_node_path45.default.resolve(app.project.projectDir, settings("INFOPLIST_FILE")) : null;
6744
+ const entitlementsFile = settings("CODE_SIGN_ENTITLEMENTS") ? import_node_path45.default.resolve(app.project.projectDir, settings("CODE_SIGN_ENTITLEMENTS")) : null;
6533
6745
  const infoPlistPending = module2.generatedInfoPlist && !options.prepareGeneratedSources;
6534
- const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs4.default.readFileSync(infoPlistFile, "utf8")) : {};
6746
+ const sourceInfo = infoPlistFile && !infoPlistPending ? import_plist3.default.parse(import_node_fs43.default.readFileSync(infoPlistFile, "utf8")) : {};
6535
6747
  if (!sourceInfo || typeof sourceInfo !== "object" || Array.isArray(sourceInfo) || sourceInfo instanceof Date || Buffer.isBuffer(sourceInfo)) {
6536
6748
  throw new Error(`${module2.name} Info.plist must contain a dictionary`);
6537
6749
  }
@@ -6556,7 +6768,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6556
6768
  }
6557
6769
  const bundleIdentifier = settings("PRODUCT_BUNDLE_IDENTIFIER") || (typeof info.CFBundleIdentifier === "string" ? info.CFBundleIdentifier : "");
6558
6770
  const keychainAccessGroups = entitlementsFile ? readKeychainAccessGroups(
6559
- import_plist3.default.parse(import_node_fs4.default.readFileSync(entitlementsFile, "utf8")),
6771
+ import_plist3.default.parse(import_node_fs43.default.readFileSync(entitlementsFile, "utf8")),
6560
6772
  (value) => expand(value, (key) => {
6561
6773
  if (key === "AppIdentifierPrefix") return "FAKETEAMID.";
6562
6774
  if (key === "TeamIdentifierPrefix") return "";
@@ -6594,7 +6806,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6594
6806
  };
6595
6807
  }
6596
6808
  const localPackageDirs = [
6597
- ...listed.filter((reference) => import_node_fs4.default.existsSync(import_node_path7.default.join(reference, "Package.swift"))),
6809
+ ...listed.filter((reference) => import_node_fs43.default.existsSync(import_node_path45.default.join(reference, "Package.swift"))),
6598
6810
  ...projects.flatMap(
6599
6811
  (project) => Object.entries(project.objects).flatMap(([id, entry]) => {
6600
6812
  if (!isDict(entry)) return [];
@@ -6604,19 +6816,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6604
6816
  const packages = [];
6605
6817
  while (pending.length > 0) {
6606
6818
  const dir = pending.pop();
6607
- if (import_node_fs4.default.existsSync(import_node_path7.default.join(dir, "Package.swift"))) {
6819
+ if (import_node_fs43.default.existsSync(import_node_path45.default.join(dir, "Package.swift"))) {
6608
6820
  packages.push(dir);
6609
6821
  continue;
6610
6822
  }
6611
6823
  if (!isDirectory(dir)) continue;
6612
- for (const child of import_node_fs4.default.readdirSync(dir, { withFileTypes: true }))
6824
+ for (const child of import_node_fs43.default.readdirSync(dir, { withFileTypes: true }))
6613
6825
  if (child.isDirectory() && !child.name.startsWith("."))
6614
- pending.push(import_node_path7.default.join(dir, child.name));
6826
+ pending.push(import_node_path45.default.join(dir, child.name));
6615
6827
  }
6616
6828
  return packages;
6617
6829
  }
6618
- const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path7.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
6619
- return candidate && import_node_fs4.default.existsSync(import_node_path7.default.join(candidate, "Package.swift")) ? [candidate] : [];
6830
+ const candidate = entry.isa === "XCLocalSwiftPackageReference" ? import_node_path45.default.resolve(project.projectDir, str(entry.relativePath) ?? "") : entry.isa === "PBXFileReference" ? project.resolvePath(id) : null;
6831
+ return candidate && import_node_fs43.default.existsSync(import_node_path45.default.join(candidate, "Package.swift")) ? [candidate] : [];
6620
6832
  })
6621
6833
  )
6622
6834
  ];
@@ -6646,7 +6858,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6646
6858
  if ((flag === "-framework" || flag === "-weak_framework") && name)
6647
6859
  sdkFrameworks.add(name);
6648
6860
  });
6649
- const absolute = (raw) => import_node_path7.default.resolve(ref.project.projectDir, expand(raw, settings2));
6861
+ const absolute = (raw) => import_node_path45.default.resolve(ref.project.projectDir, expand(raw, settings2));
6650
6862
  const requested = options.nativeModules;
6651
6863
  const includeBinary = (name, dir) => {
6652
6864
  if (!requested || nativeTargets.has(ref) || requested.includes(name) || dir.endsWith(".xcframework") && localSwiftBinaryModules(dir).some((module3) => requested.includes(module3)))
@@ -6658,14 +6870,14 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6658
6870
  for (const directory of expandSearchPath(absolute(raw), searchRules)) {
6659
6871
  if (frameworkSearchDirectories.has(directory)) continue;
6660
6872
  frameworkSearchDirectories.add(directory);
6661
- if (!import_node_fs4.default.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
6873
+ if (!import_node_fs43.default.statSync(directory, { throwIfNoEntry: false })?.isDirectory() || /\.sdk\/(?:System|Developer)\/Library\/Frameworks\/?$/.test(directory))
6662
6874
  continue;
6663
- for (const entry of import_node_fs4.default.readdirSync(directory, { withFileTypes: true })) {
6875
+ for (const entry of import_node_fs43.default.readdirSync(directory, { withFileTypes: true })) {
6664
6876
  const name = /^(.+)\.framework$/.exec(entry.name)?.[1];
6665
6877
  if (!name || byProduct.has(entry.name) || searchedFrameworks.has(name))
6666
6878
  continue;
6667
- const file = import_node_path7.default.join(directory, entry.name);
6668
- if (import_node_fs4.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
6879
+ const file = import_node_path45.default.join(directory, entry.name);
6880
+ if (import_node_fs43.default.statSync(file, { throwIfNoEntry: false })?.isDirectory())
6669
6881
  searchedFrameworks.set(name, file);
6670
6882
  }
6671
6883
  }
@@ -6673,9 +6885,9 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6673
6885
  }
6674
6886
  for (const raw of settingList(settings2("SWIFT_INCLUDE_PATHS"))) {
6675
6887
  const dir = absolute(raw);
6676
- const modulemap = import_node_path7.default.join(dir, "module.modulemap");
6677
- if (!import_node_fs4.default.existsSync(modulemap)) continue;
6678
- const name = moduleMapName(import_node_fs4.default.readFileSync(modulemap, "utf8"));
6888
+ const modulemap = import_node_path45.default.join(dir, "module.modulemap");
6889
+ if (!import_node_fs43.default.existsSync(modulemap)) continue;
6890
+ const name = moduleMapName(import_node_fs43.default.readFileSync(modulemap, "utf8"));
6679
6891
  if (name && !binaryFrameworks.has(name)) includeBinary(name, dir);
6680
6892
  }
6681
6893
  for (const phaseId of list(ref.target.buildPhases)) {
@@ -6684,7 +6896,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6684
6896
  const inputs = list(phase.inputPaths).map(absolute);
6685
6897
  for (const raw of list(phase.inputFileListPaths)) {
6686
6898
  const file = absolute(raw);
6687
- if (!import_node_fs4.default.existsSync(file)) continue;
6899
+ if (!import_node_fs43.default.existsSync(file)) continue;
6688
6900
  xcconfigs.add(file);
6689
6901
  inputs.push(...fileListEntries(file, absolute));
6690
6902
  }
@@ -6749,7 +6961,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6749
6961
  ...productAttributes.get(dependencyId)?.length ? { attributes: productAttributes.get(dependencyId) } : {},
6750
6962
  source: reference?.isa === "XCRemoteSwiftPackageReference" ? { kind: "remote", url: str(reference.repositoryURL) ?? "" } : reference?.isa === "XCLocalSwiftPackageReference" ? {
6751
6963
  kind: "local",
6752
- dir: import_node_path7.default.resolve(
6964
+ dir: import_node_path45.default.resolve(
6753
6965
  project.projectDir,
6754
6966
  str(reference.relativePath) ?? ""
6755
6967
  )
@@ -6783,10 +6995,10 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6783
6995
  continue;
6784
6996
  }
6785
6997
  if (tree === "BUILT_PRODUCTS_DIR" || tree === "DEVELOPER_DIR" || // a target in the workspace builds it, so it exists only after that build
6786
- byProduct.has(import_node_path7.default.basename(rawPath)))
6998
+ byProduct.has(import_node_path45.default.basename(rawPath)))
6787
6999
  continue;
6788
7000
  const resolved = fileId ? project.resolvePath(fileId) : null;
6789
- if (fileId && resolved !== null && !import_node_fs4.default.existsSync(resolved)) {
7001
+ if (fileId && resolved !== null && !import_node_fs43.default.existsSync(resolved)) {
6790
7002
  if (!ios_sdk_frameworks_default.frameworks.includes(name))
6791
7003
  throw new Error(
6792
7004
  `${str(target.name) ?? "target"}: linked framework ${name} (${fileId}) points at missing ${resolved} in ${project.projectFile}`
@@ -6813,7 +7025,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6813
7025
  ({ product }) => !options.nativeModules || nativeTargets.has(built.ref) || options.nativeModules.includes(product)
6814
7026
  );
6815
7027
  const resolvedFile = workspaceResolvedFile(xcodeprojOrWorkspace);
6816
- let packageResolved = import_node_fs4.default.existsSync(resolvedFile) ? [import_node_fs4.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path7.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs4.default.existsSync(file)).map((file) => import_node_fs4.default.realpathSync.native(file)).sort();
7028
+ let packageResolved = import_node_fs43.default.existsSync(resolvedFile) ? [import_node_fs43.default.realpathSync.native(resolvedFile)] : [...new Set(localPackageDirs.map((dir) => import_node_path45.default.join(dir, "Package.resolved")))].filter((file) => import_node_fs43.default.existsSync(file)).map((file) => import_node_fs43.default.realpathSync.native(file)).sort();
6817
7029
  if (packageResolved.length === 0) {
6818
7030
  const requirements = remotePackageRequirements(projects);
6819
7031
  if (requirements.length > 0) {
@@ -6864,19 +7076,19 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6864
7076
  } : {},
6865
7077
  rootDir: commonAncestor(
6866
7078
  [
6867
- workspace ? import_node_path7.default.dirname(workspace) : app.project.projectDir,
7079
+ workspace ? import_node_path45.default.dirname(workspace) : app.project.projectDir,
6868
7080
  ...used.map((project) => project.projectDir),
6869
7081
  ...localPackageDirs,
6870
7082
  ...linkedProducts.flatMap(
6871
- ({ source }) => source.kind === "local" && import_node_fs4.default.existsSync(source.dir) ? [source.dir] : []
7083
+ ({ source }) => source.kind === "local" && import_node_fs43.default.existsSync(source.dir) ? [source.dir] : []
6872
7084
  ),
6873
7085
  ...new Set(podSourceDirs),
6874
7086
  // a target's own files may sit beside the project, such as an asset
6875
7087
  // catalog one folder up, and xcode builds them from there
6876
7088
  ...new Set(
6877
- [...module2.allSources, ...module2.resources].filter((file) => import_node_fs4.default.existsSync(file)).map((file) => import_node_path7.default.dirname(file))
7089
+ [...module2.allSources, ...module2.resources].filter((file) => import_node_fs43.default.existsSync(file)).map((file) => import_node_path45.default.dirname(file))
6878
7090
  )
6879
- ].map((dir) => import_node_fs4.default.realpathSync.native(dir))
7091
+ ].map((dir) => import_node_fs43.default.realpathSync.native(dir))
6880
7092
  ),
6881
7093
  projectFiles: [
6882
7094
  .../* @__PURE__ */ new Set([
@@ -6897,7 +7109,7 @@ function readXcodeAppTarget(input, targetName, configurationName, options = {})
6897
7109
  resourceProducts,
6898
7110
  linkedProducts,
6899
7111
  localPackageDirs: [
6900
- ...new Set(localPackageDirs.map((dir) => import_node_fs4.default.realpathSync.native(dir)))
7112
+ ...new Set(localPackageDirs.map((dir) => import_node_fs43.default.realpathSync.native(dir)))
6901
7113
  ].sort(),
6902
7114
  binaryFrameworks: [...binaryFrameworks].map(([name, file]) => ({ name, path: file })).sort((left, right) => left.name.localeCompare(right.name)),
6903
7115
  sdkFrameworks: [...sdkFrameworks].filter(
@@ -7002,7 +7214,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
7002
7214
  const rtcAppGroupIdentifier = nonEmptyString2(dictionary.RTCAppGroupIdentifier);
7003
7215
  const screenShareExtensionBundleId = typeof dictionary.ScreenShareExtensionBundleId === "string" ? dictionary.ScreenShareExtensionBundleId : void 0;
7004
7216
  const rootModuleName = readRootModuleName(
7005
- app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs5.default.existsSync(file)).map((file) => import_node_fs5.default.readFileSync(file, "utf8"))
7217
+ app.allSources.filter((file) => /Delegate\.(?:swift|mm|m)$/.test(file) && import_node_fs44.default.existsSync(file)).map((file) => import_node_fs44.default.readFileSync(file, "utf8"))
7006
7218
  );
7007
7219
  const identity = {
7008
7220
  ...app.keychainAccessGroups === void 0 ? {} : { keychainAccessGroups: app.keychainAccessGroups },
@@ -7025,7 +7237,7 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
7025
7237
  googleSignIn: readGoogleSignInConfiguration(
7026
7238
  dictionary,
7027
7239
  Object.fromEntries(
7028
- app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs5.default.readFileSync(file, "utf8"))])
7240
+ app.resources.filter((file) => file.endsWith(".plist")).map((file) => [file, parseInfoPlist(import_node_fs44.default.readFileSync(file, "utf8"))])
7029
7241
  )
7030
7242
  ),
7031
7243
  supportedInterfaceOrientations,
@@ -7035,11 +7247,11 @@ function readNativeAppIdentityFromXcodeTarget(app, parseInfoPlist = parsePlistSo
7035
7247
  bundleIcons: resolveNativeBundleIcons(icons, catalogAlternateNames, (value) => value),
7036
7248
  appIconArtwork: resolveNativeAppIconArtwork(
7037
7249
  app.resources,
7038
- (file) => import_node_fs5.default.readFileSync(file, "utf8"),
7250
+ (file) => import_node_fs44.default.readFileSync(file, "utf8"),
7039
7251
  (file) => {
7040
- const extension = import_node_path8.default.extname(file).toLowerCase();
7252
+ const extension = import_node_path46.default.extname(file).toLowerCase();
7041
7253
  const contentType = extension === ".jpg" || extension === ".jpeg" ? "image/jpeg" : extension === ".webp" ? "image/webp" : "image/png";
7042
- return `data:${contentType};base64,${import_node_fs5.default.readFileSync(file).toString("base64")}`;
7254
+ return `data:${contentType};base64,${import_node_fs44.default.readFileSync(file).toString("base64")}`;
7043
7255
  },
7044
7256
  icons,
7045
7257
  app.appIconName,
@@ -7076,11 +7288,11 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
7076
7288
  const read = selectNativeAppIdentityReader(platform, {
7077
7289
  android: () => null,
7078
7290
  ios: () => {
7079
- const nested = import_node_path8.default.join(projectRoot, "ios");
7080
- const iosRoot = import_node_fs5.default.existsSync(nested) ? nested : projectRoot;
7291
+ const nested = import_node_path46.default.join(projectRoot, "ios");
7292
+ const iosRoot = import_node_fs44.default.existsSync(nested) ? nested : projectRoot;
7081
7293
  const prefix = iosRoot === nested ? "ios/" : "";
7082
7294
  const files = {};
7083
- for (const entry of import_node_fs5.default.readdirSync(iosRoot, { withFileTypes: true })) {
7295
+ for (const entry of import_node_fs44.default.readdirSync(iosRoot, { withFileTypes: true })) {
7084
7296
  if (entry.name === "Pods") continue;
7085
7297
  if (entry.isDirectory()) {
7086
7298
  const names = entry.name.endsWith(".xcodeproj") ? ["project.pbxproj"] : [
@@ -7088,17 +7300,17 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
7088
7300
  "AppDelegate.swift",
7089
7301
  "AppDelegate.mm",
7090
7302
  "AppDelegate.m",
7091
- ...import_node_fs5.default.readdirSync(import_node_path8.default.join(iosRoot, entry.name)).filter((name) => name.endsWith(".entitlements"))
7303
+ ...import_node_fs44.default.readdirSync(import_node_path46.default.join(iosRoot, entry.name)).filter((name) => name.endsWith(".entitlements"))
7092
7304
  ];
7093
7305
  for (const name of names) {
7094
- const relative = `${prefix}${entry.name}/${name}`;
7095
- const file = import_node_path8.default.join(projectRoot, relative);
7096
- if (import_node_fs5.default.existsSync(file)) files[relative] = import_node_fs5.default.readFileSync(file, "utf8");
7306
+ const relative2 = `${prefix}${entry.name}/${name}`;
7307
+ const file = import_node_path46.default.join(projectRoot, relative2);
7308
+ if (import_node_fs44.default.existsSync(file)) files[relative2] = import_node_fs44.default.readFileSync(file, "utf8");
7097
7309
  }
7098
7310
  } else if (/AppDelegate\.(?:swift|mm|m)$|\.entitlements$/.test(entry.name)) {
7099
- const relative = `${prefix}${entry.name}`;
7100
- const file = import_node_path8.default.join(projectRoot, relative);
7101
- if (import_node_fs5.default.existsSync(file)) files[relative] = import_node_fs5.default.readFileSync(file, "utf8");
7311
+ const relative2 = `${prefix}${entry.name}`;
7312
+ const file = import_node_path46.default.join(projectRoot, relative2);
7313
+ if (import_node_fs44.default.existsSync(file)) files[relative2] = import_node_fs44.default.readFileSync(file, "utf8");
7102
7314
  }
7103
7315
  }
7104
7316
  const identity = extractNativeAppIdentityFromFiles(
@@ -7115,41 +7327,41 @@ function readNativeAppIdentityFromSources(projectRoot, platform, parseInfoPlist,
7115
7327
  function readAndroidNativeAppIdentity(projectRoot, androidMergedManifest) {
7116
7328
  const files = {};
7117
7329
  if (androidMergedManifest) {
7118
- const file = import_node_path8.default.resolve(projectRoot, androidMergedManifest);
7119
- if (!import_node_fs5.default.existsSync(file)) return null;
7120
- files[androidMergedManifest] = import_node_fs5.default.readFileSync(file, "utf8");
7330
+ const file = import_node_path46.default.resolve(projectRoot, androidMergedManifest);
7331
+ if (!import_node_fs44.default.existsSync(file)) return null;
7332
+ files[androidMergedManifest] = import_node_fs44.default.readFileSync(file, "utf8");
7121
7333
  } else {
7122
- const androidRoot = import_node_path8.default.join(projectRoot, "android");
7123
- if (!import_node_fs5.default.existsSync(androidRoot)) return null;
7334
+ const androidRoot = import_node_path46.default.join(projectRoot, "android");
7335
+ if (!import_node_fs44.default.existsSync(androidRoot)) return null;
7124
7336
  const collect = (directory) => {
7125
- for (const entry of import_node_fs5.default.readdirSync(directory, { withFileTypes: true })) {
7126
- const file = import_node_path8.default.join(directory, entry.name);
7337
+ for (const entry of import_node_fs44.default.readdirSync(directory, { withFileTypes: true })) {
7338
+ const file = import_node_path46.default.join(directory, entry.name);
7127
7339
  if (entry.isDirectory()) collect(file);
7128
7340
  else if (entry.isFile() && entry.name === "AndroidManifest.xml")
7129
- files[import_node_path8.default.relative(projectRoot, file).split(import_node_path8.default.sep).join("/")] = import_node_fs5.default.readFileSync(file, "utf8");
7341
+ files[import_node_path46.default.relative(projectRoot, file).split(import_node_path46.default.sep).join("/")] = import_node_fs44.default.readFileSync(file, "utf8");
7130
7342
  }
7131
7343
  };
7132
- for (const module2 of import_node_fs5.default.readdirSync(androidRoot, { withFileTypes: true })) {
7344
+ for (const module2 of import_node_fs44.default.readdirSync(androidRoot, { withFileTypes: true })) {
7133
7345
  if (!module2.isDirectory()) continue;
7134
- const outputs = import_node_path8.default.join(
7346
+ const outputs = import_node_path46.default.join(
7135
7347
  androidRoot,
7136
7348
  module2.name,
7137
7349
  "build/intermediates/merged_manifests"
7138
7350
  );
7139
- if (import_node_fs5.default.existsSync(outputs)) collect(outputs);
7351
+ if (import_node_fs44.default.existsSync(outputs)) collect(outputs);
7140
7352
  }
7141
7353
  }
7142
7354
  for (const manifest of Object.keys(files)) {
7143
7355
  const resourceDirectory = androidMergedResourceValuesDirectory(manifest);
7144
7356
  if (!resourceDirectory) continue;
7145
- const absolute = import_node_path8.default.resolve(projectRoot, resourceDirectory);
7146
- if (!import_node_fs5.default.existsSync(absolute)) continue;
7147
- for (const entry of import_node_fs5.default.readdirSync(absolute, { withFileTypes: true })) {
7357
+ const absolute = import_node_path46.default.resolve(projectRoot, resourceDirectory);
7358
+ if (!import_node_fs44.default.existsSync(absolute)) continue;
7359
+ for (const entry of import_node_fs44.default.readdirSync(absolute, { withFileTypes: true })) {
7148
7360
  if (!entry.isDirectory() || !/^values(?:-|$)/.test(entry.name)) continue;
7149
- for (const resource of import_node_fs5.default.readdirSync(import_node_path8.default.join(absolute, entry.name))) {
7361
+ for (const resource of import_node_fs44.default.readdirSync(import_node_path46.default.join(absolute, entry.name))) {
7150
7362
  if (!resource.endsWith(".xml")) continue;
7151
7363
  const file = `${resourceDirectory}/${entry.name}/${resource}`;
7152
- files[file] = import_node_fs5.default.readFileSync(import_node_path8.default.resolve(projectRoot, file), "utf8");
7364
+ files[file] = import_node_fs44.default.readFileSync(import_node_path46.default.resolve(projectRoot, file), "utf8");
7153
7365
  }
7154
7366
  }
7155
7367
  }
@@ -7170,7 +7382,7 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
7170
7382
  parseInfoPlist,
7171
7383
  buildSdkVersion
7172
7384
  );
7173
- const projectManifestPath = import_node_path8.default.join(projectRoot, "package.json");
7385
+ const projectManifestPath = import_node_path46.default.join(projectRoot, "package.json");
7174
7386
  const projectRequire = (0, import_node_module.createRequire)(projectManifestPath);
7175
7387
  let reanimatedManifestPath;
7176
7388
  try {
@@ -7184,22 +7396,22 @@ function readIosNativeAppIdentity(projectRoot, parseInfoPlist, iosTarget, enviro
7184
7396
  throw error;
7185
7397
  }
7186
7398
  const installedManifest = JSON.parse(
7187
- import_node_fs5.default.readFileSync(reanimatedManifestPath, "utf8")
7399
+ import_node_fs44.default.readFileSync(reanimatedManifestPath, "utf8")
7188
7400
  );
7189
7401
  const installedVersion = isRecord(installedManifest) ? nonEmptyString2(installedManifest.version) : void 0;
7190
7402
  if (!installedVersion) throw new Error("Reanimated package version is malformed");
7191
7403
  if (Number.parseInt(installedVersion, 10) < 4) return identity;
7192
7404
  const defaults = JSON.parse(
7193
- import_node_fs5.default.readFileSync(
7194
- import_node_path8.default.join(
7195
- import_node_path8.default.dirname(reanimatedManifestPath),
7405
+ import_node_fs44.default.readFileSync(
7406
+ import_node_path46.default.join(
7407
+ import_node_path46.default.dirname(reanimatedManifestPath),
7196
7408
  "src/featureFlags/staticFlags.json"
7197
7409
  ),
7198
7410
  "utf8"
7199
7411
  )
7200
7412
  );
7201
7413
  if (!isRecord(defaults)) throw new Error("Reanimated static flags are malformed");
7202
- const manifest = JSON.parse(import_node_fs5.default.readFileSync(projectManifestPath, "utf8"));
7414
+ const manifest = JSON.parse(import_node_fs44.default.readFileSync(projectManifestPath, "utf8"));
7203
7415
  const reanimated = isRecord(manifest) ? manifest.reanimated : void 0;
7204
7416
  const overrides = isRecord(reanimated) ? reanimated.staticFeatureFlags : void 0;
7205
7417
  if (overrides !== void 0 && !isRecord(overrides)) {