peachsim 0.1.2746 → 0.1.2748

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 (141) hide show
  1. package/cli/outbound-endpoints.ts +19 -9
  2. package/dist-lib/agent-daemon-client.cjs +1 -1
  3. package/dist-lib/agent-events.cjs +1 -1
  4. package/dist-lib/attached-projects.cjs +1 -1
  5. package/dist-lib/auth/shared-session.cjs +1 -1
  6. package/dist-lib/backend-origin.cjs +1 -1
  7. package/dist-lib/beta.cjs +1 -1
  8. package/dist-lib/beta.mjs +2 -2
  9. package/dist-lib/bridge-constants.cjs +1 -1
  10. package/dist-lib/bridge-contract-input.cjs +1 -1
  11. package/dist-lib/bridge-contract-input.mjs +5 -5
  12. package/dist-lib/bridge-contract.cjs +1 -1
  13. package/dist-lib/bridge-contract.mjs +3 -3
  14. package/dist-lib/bundle-channel.cjs +3902 -3889
  15. package/dist-lib/capture-contract.cjs +1 -1
  16. package/dist-lib/capture-contract.mjs +3 -3
  17. package/dist-lib/cloud-contract.cjs +1 -1
  18. package/dist-lib/cloud-contract.mjs +3 -3
  19. package/dist-lib/cloud-test-args.cjs +1 -1
  20. package/dist-lib/cloud-test-args.mjs +2 -2
  21. package/dist-lib/cloud.cjs +1 -1
  22. package/dist-lib/cloud.mjs +7 -7
  23. package/dist-lib/config.cjs +1 -1
  24. package/dist-lib/config.mjs +5 -5
  25. package/dist-lib/detox/index.cjs +1 -1
  26. package/dist-lib/dev-bundle-resolution.cjs +1 -1
  27. package/dist-lib/esm-chunks/{acorn-QOTAOF5Z.mjs → acorn-VEWLHGUF.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-QST2EJ23.mjs → chunk-4QUOVEXG.mjs} +3 -3
  29. package/dist-lib/esm-chunks/{chunk-JBA5MZXI.mjs → chunk-62Z4HAA5.mjs} +16 -15
  30. package/dist-lib/esm-chunks/{chunk-L7AI2APK.mjs → chunk-6ZVR2CVC.mjs} +1 -1
  31. package/dist-lib/esm-chunks/{chunk-4NBVXIZE.mjs → chunk-A2EC74CI.mjs} +1 -1
  32. package/dist-lib/esm-chunks/{chunk-TMC5X24U.mjs → chunk-BYYBOHZI.mjs} +1 -1
  33. package/dist-lib/esm-chunks/{chunk-2WXEOIBB.mjs → chunk-C6IVVMZN.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-3NVVAQSW.mjs → chunk-GWZFPIGW.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-TEIXMLXF.mjs → chunk-HMPLB7MA.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-ZIB7E2UZ.mjs → chunk-HPANCGMI.mjs} +2 -2
  37. package/dist-lib/esm-chunks/{chunk-LJCRY4MG.mjs → chunk-HRS3DSAZ.mjs} +6 -6
  38. package/dist-lib/esm-chunks/{chunk-VU3BUF6L.mjs → chunk-I3KV46CL.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-GT4KPY7G.mjs → chunk-IE2LTKEG.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-ZJOVVIFO.mjs → chunk-KD3TI7UV.mjs} +4 -4
  41. package/dist-lib/esm-chunks/{chunk-5HNCEXGF.mjs → chunk-KNNMOD5T.mjs} +1 -1
  42. package/dist-lib/esm-chunks/{chunk-XLZ2P347.mjs → chunk-NNVYKFSY.mjs} +1 -1
  43. package/dist-lib/esm-chunks/{chunk-JWQYDDFF.mjs → chunk-RU7J2QST.mjs} +1 -1
  44. package/dist-lib/esm-chunks/{chunk-ZQQKJLZG.mjs → chunk-TQACQLZ6.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-BBTAOM4S.mjs → chunk-TW5FZFU7.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-4IWPN4FR.mjs → chunk-U5SZIAIF.mjs} +1 -1
  47. package/dist-lib/esm-chunks/{chunk-LCAHUXRX.mjs → chunk-UFQHPARI.mjs} +199 -197
  48. package/dist-lib/esm-chunks/{chunk-RHXTAMFH.mjs → chunk-UNOAFCHH.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-PGBXZIRW.mjs → chunk-VKYISXKK.mjs} +5 -5
  50. package/dist-lib/esm-chunks/{chunk-HCGHGGZY.mjs → chunk-WN22FGGA.mjs} +1 -1
  51. package/dist-lib/esm-chunks/{chunk-SGCTCFCQ.mjs → chunk-XM3QYC5V.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-4PCWGBJT.mjs → metro-layout-parser-B74NVOKQ.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-FVIN2AH2.mjs → swift-package-prebuilt-B4QBXBQL.mjs} +12 -12
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-YTTAJZSA.mjs → swift-sdk-app-module-5OCMAJPP.mjs} +16 -16
  55. package/dist-lib/esm-chunks/{swift-sdk-image-GHK7ZE4W.mjs → swift-sdk-image-LQKEASAW.mjs} +16 -16
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-C7JWU22H.mjs → swift-sdk-image-producer-ZMYZXL7Z.mjs} +8 -7
  57. package/dist-lib/expo-swift-bundle.cjs +143 -130
  58. package/dist-lib/expo-swift-metadata.cjs +1 -1
  59. package/dist-lib/expo-swift-metadata.mjs +7 -7
  60. package/dist-lib/home-paths.cjs +1 -1
  61. package/dist-lib/host/bridge-host.cjs +434 -421
  62. package/dist-lib/host/fetch-proxy-handler.cjs +15 -8
  63. package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
  64. package/dist-lib/host/fetch-proxy-overrides.mjs +2 -2
  65. package/dist-lib/host/replacement-module-handler.cjs +1 -1
  66. package/dist-lib/host/websocket-proxy.cjs +1 -1
  67. package/dist-lib/index.cjs +1 -1
  68. package/dist-lib/kotlin-host.cjs +1 -1
  69. package/dist-lib/menu.cjs +1 -1
  70. package/dist-lib/menu.mjs +3 -3
  71. package/dist-lib/metro-fingerprint-registry.cjs +1 -1
  72. package/dist-lib/metro-fingerprint-registry.mjs +3 -3
  73. package/dist-lib/metro-production-bundle.cjs +1 -1
  74. package/dist-lib/metro-production-bundle.mjs +4 -4
  75. package/dist-lib/native-app-identity-project.cjs +1 -1
  76. package/dist-lib/native-app-identity-project.mjs +15 -15
  77. package/dist-lib/native-app-identity.cjs +1 -1
  78. package/dist-lib/native-app-identity.mjs +6 -6
  79. package/dist-lib/native-firebase-metadata.cjs +1 -1
  80. package/dist-lib/native-firebase-metadata.mjs +3 -3
  81. package/dist-lib/pdfium-raster.cjs +1 -1
  82. package/dist-lib/pdfium-raster.mjs +2 -2
  83. package/dist-lib/plist.cjs +1 -1
  84. package/dist-lib/plist.mjs +3 -3
  85. package/dist-lib/profiles.cjs +1 -1
  86. package/dist-lib/public-brand.cjs +1 -1
  87. package/dist-lib/public-origins-lib-esm.json +86 -85
  88. package/dist-lib/public-origins-lib.json +73 -67
  89. package/dist-lib/react-native-host-modules.cjs +1 -1
  90. package/dist-lib/react-native-host-modules.mjs +2 -2
  91. package/dist-lib/reap-browser.cjs +1 -1
  92. package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
  93. package/dist-lib/sdk.cjs +1 -1
  94. package/dist-lib/sdk.mjs +8 -8
  95. package/dist-lib/skills.cjs +434 -421
  96. package/dist-lib/swift-compile.cjs +124 -115
  97. package/dist-lib/swift-compile.mjs +12 -12
  98. package/dist-lib/swift-package.cjs +1 -1
  99. package/dist-lib/swift-package.mjs +3 -3
  100. package/dist-lib/swift-submit.cjs +1 -1
  101. package/dist-lib/swift-submit.mjs +6 -6
  102. package/dist-lib/swift-svg-raster.cjs +1 -1
  103. package/dist-lib/swift-svg-raster.mjs +2 -2
  104. package/dist-lib/swift-toolchain.cjs +1 -1
  105. package/dist-lib/swift.cjs +1 -1
  106. package/dist-lib/vendor/@peculiar/x509.cjs +1 -1
  107. package/dist-lib/vendor/@ruby/prism/src/nodes.js.cjs +1 -1
  108. package/dist-lib/vendor/@ruby/prism/src/parsePrism.js.cjs +1 -1
  109. package/dist-lib/vendor/acorn.cjs +1 -1
  110. package/dist-lib/vendor/magic-string.cjs +1 -1
  111. package/dist-lib/vendor/stream-json.cjs +1 -1
  112. package/dist-lib/vendor/sucrase/dist/index.js.cjs +1 -1
  113. package/dist-lib/vendor/sucrase/dist/parser/index.js.cjs +1 -1
  114. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/index.js.cjs +1 -1
  115. package/dist-lib/vendor/sucrase/dist/parser/tokenizer/types.js.cjs +1 -1
  116. package/dist-lib/vendor/sucrase.cjs +1 -1
  117. package/dist-lib/vendor/terser.cjs +1 -1
  118. package/dist-lib/vendor/valibot.cjs +1 -1
  119. package/dist-lib/vendor/ws.cjs +1 -1
  120. package/dist-lib/vendor/zod.cjs +1 -1
  121. package/dist-lib/worklet-executable.cjs +1 -1
  122. package/dist-lib/worklet-executable.mjs +3 -3
  123. package/dist-types/packages/peach-engine/src/engine/canvaskit/graphite.d.ts +13 -0
  124. package/dist-types/packages/peach-engine/src/engine/native-paint-facts.d.ts +3 -1
  125. package/dist-types/packages/peach-engine/src/engine/paint-value-input.d.ts +7 -0
  126. package/dist-types/packages/peach-engine/src/engine/scene-native-binding.d.ts +2 -2
  127. package/dist-types/packages/peach-engine/src/render-worker/canvaskit-webgpu.d.ts +2 -19
  128. package/dist-types/packages/peach-engine/src/render-worker/compositor-gpu.d.ts +2 -1
  129. package/dist-types/packages/peach-engine/src/render-worker/native-hot-ops.d.ts +2 -2
  130. package/package.json +1 -1
  131. package/src/expo-swift-host.ts +4 -0
  132. package/src/one-native-controls-package.ts +5 -5
  133. package/src/one-sdk-bundle.ts +1 -1
  134. package/src/swift-compiler-digest.ts +1 -0
  135. package/src/swift-objc-compile.ts +4 -5
  136. package/src/swift-objc-prebuilt.ts +2 -2
  137. package/src/swift-pdf-raster.ts +2 -2
  138. package/src/swift-sdk-image-producer.ts +2 -1
  139. package/src/swift-sdk-surface.ts +4 -120
  140. package/src/swift-source-pods.ts +3 -3
  141. package/src/one-sdk/shard.ts +0 -382
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2746 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2748 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  SWIFT_CACHE_HOLD_MARKER,
4
4
  SWIFT_WASM_TRIPLE,
@@ -12,19 +12,19 @@ import {
12
12
  terminateProcessGroup,
13
13
  wasmThreadFlags,
14
14
  windowAdmission
15
- } from "./chunk-4NBVXIZE.mjs";
15
+ } from "./chunk-A2EC74CI.mjs";
16
16
  import {
17
17
  isSwiftResourcePath
18
- } from "./chunk-TMC5X24U.mjs";
18
+ } from "./chunk-BYYBOHZI.mjs";
19
19
  import {
20
20
  swiftManifestDeclarations
21
- } from "./chunk-GT4KPY7G.mjs";
21
+ } from "./chunk-IE2LTKEG.mjs";
22
22
  import {
23
23
  isRecord
24
- } from "./chunk-RHXTAMFH.mjs";
24
+ } from "./chunk-UNOAFCHH.mjs";
25
25
  import {
26
26
  __publicField
27
- } from "./chunk-JWQYDDFF.mjs";
27
+ } from "./chunk-RU7J2QST.mjs";
28
28
 
29
29
  // src/write-build-file.ts
30
30
  import { mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
@@ -899,7 +899,7 @@ function swiftSharedSdkInputFiles(moduleRoot) {
899
899
 
900
900
  // src/swift-sdk-surface.ts
901
901
  import { execFileSync as execFileSync3, spawnSync as spawnSync3 } from "node:child_process";
902
- import { createHash as createHash4, randomUUID as randomUUID2 } from "node:crypto";
902
+ import { createHash as createHash4, randomUUID } from "node:crypto";
903
903
  import {
904
904
  chmodSync,
905
905
  copyFileSync,
@@ -916,43 +916,118 @@ import {
916
916
  writeFileSync as writeFileSync2
917
917
  } from "node:fs";
918
918
  import os from "node:os";
919
- import path9 from "node:path";
920
-
921
- // src/home-paths.ts
922
- import { randomUUID } from "node:crypto";
923
- import fs4 from "node:fs";
924
- import { homedir } from "node:os";
925
919
  import path8 from "node:path";
926
- var PEACH_HOME_ENV = "PEACH_HOME";
927
- var ACTIVE_RUNTIME_FILE = "active";
928
- function ambientHomeDir() {
929
- return path8.join(homedir(), ".peach");
930
- }
931
- function rnxHomeDir() {
932
- const override = process.env[PEACH_HOME_ENV];
933
- return override && override.length > 0 ? path8.resolve(override) : ambientHomeDir();
934
- }
935
- function runtimesDir() {
936
- return path8.join(rnxHomeDir(), "runtimes");
937
- }
938
- function runtimeDir(version) {
939
- return path8.join(runtimesDir(), version);
940
- }
941
- function activeRuntimeFile() {
942
- return path8.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
943
- }
944
- function cacheDir() {
945
- return path8.join(rnxHomeDir(), "cache");
946
- }
947
- function readActiveRuntime() {
948
- try {
949
- const value = fs4.readFileSync(activeRuntimeFile(), "utf8").trim();
950
- return value.length > 0 ? value : null;
951
- } catch {
952
- return null;
953
- }
920
+
921
+ // ../peach-globals/build/swift-source-mask.ts
922
+ function maskSwiftCode(source) {
923
+ const chars = source.split("");
924
+ const blank = (from, to) => {
925
+ for (let i = Math.max(0, from); i < Math.min(to, chars.length); i++)
926
+ if (chars[i] !== "\n") chars[i] = " ";
927
+ };
928
+ const hashesAt = (at) => {
929
+ let end = at;
930
+ while (source[end] === "#") end++;
931
+ return end - at;
932
+ };
933
+ const scanString = (quote, hashes) => {
934
+ const multiline = source.startsWith('"""', quote);
935
+ let i = quote + (multiline ? 3 : 1);
936
+ const keep = [];
937
+ const quoteEnd = (at) => {
938
+ const mark = multiline ? '"""' : '"';
939
+ return source.startsWith(mark, at) && source.startsWith("#".repeat(hashes), at + mark.length);
940
+ };
941
+ while (i < chars.length) {
942
+ if (source[i] === "\\" && source.startsWith("#".repeat(hashes), i + 1)) {
943
+ const escaped = i + 1 + hashes;
944
+ if (source[escaped] === "(") {
945
+ const codeStart = escaped + 1;
946
+ const codeEnd = scanCode(codeStart, true);
947
+ keep.push([codeStart, codeEnd]);
948
+ i = codeEnd + 1;
949
+ } else {
950
+ i = escaped + 1;
951
+ }
952
+ continue;
953
+ }
954
+ if (quoteEnd(i)) {
955
+ const close = i + (multiline ? 3 : 1) + hashes;
956
+ let cursor = quote - hashes;
957
+ const ranges = [...keep, [close, close]];
958
+ for (const [from, to] of ranges)
959
+ if (from > cursor) {
960
+ blank(cursor, from);
961
+ cursor = to;
962
+ } else cursor = Math.max(cursor, to);
963
+ return close;
964
+ }
965
+ i++;
966
+ }
967
+ blank(quote - hashes, chars.length);
968
+ return chars.length;
969
+ };
970
+ const scanCode = (i, nested) => {
971
+ let parens = 0;
972
+ while (i < chars.length) {
973
+ const char = source[i];
974
+ if (char === "/" && source[i + 1] === "/") {
975
+ const end = source.indexOf("\n", i);
976
+ blank(i, end === -1 ? chars.length : end);
977
+ i = end === -1 ? chars.length : end;
978
+ continue;
979
+ }
980
+ if (char === "/" && source[i + 1] === "*") {
981
+ let j = i + 2;
982
+ let depth = 1;
983
+ while (j < chars.length && depth > 0) {
984
+ if (source.startsWith("/*", j)) {
985
+ depth++;
986
+ j += 2;
987
+ } else if (source.startsWith("*/", j)) {
988
+ depth--;
989
+ j += 2;
990
+ } else j++;
991
+ }
992
+ blank(i, j);
993
+ i = j;
994
+ continue;
995
+ }
996
+ if (char === "#") {
997
+ const hashes = hashesAt(i);
998
+ const at = i + hashes;
999
+ if (source[at] === '"') {
1000
+ i = scanString(at, hashes);
1001
+ continue;
1002
+ }
1003
+ if (hashes > 0 && source[at] === "/") {
1004
+ const mark = "#".repeat(hashes);
1005
+ let j = at + 1;
1006
+ while (j < chars.length && !(source[j] === "/" && source.startsWith(mark, j + 1)))
1007
+ j++;
1008
+ blank(i, Math.min(chars.length, j + 1 + hashes));
1009
+ i = Math.min(chars.length, j + 1 + hashes);
1010
+ continue;
1011
+ }
1012
+ i++;
1013
+ continue;
1014
+ }
1015
+ if (char === '"') {
1016
+ i = scanString(i, 0);
1017
+ continue;
1018
+ }
1019
+ if (char === "(") parens++;
1020
+ else if (char === ")") {
1021
+ if (nested && parens === 0) return i;
1022
+ parens--;
1023
+ }
1024
+ i++;
1025
+ }
1026
+ return i;
1027
+ };
1028
+ scanCode(0, false);
1029
+ return chars.join("");
954
1030
  }
955
- var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
956
1031
 
957
1032
  // src/swift-sdk-surface.ts
958
1033
  function swiftBuildJobs() {
@@ -968,7 +1043,7 @@ function swiftBuildJobs() {
968
1043
  return Math.min(cores, memoryJobs);
969
1044
  }
970
1045
  function swiftDistributionAt(root) {
971
- const file = path9.join(root, SWIFT_DISTRIBUTION_MANIFEST);
1046
+ const file = path8.join(root, SWIFT_DISTRIBUTION_MANIFEST);
972
1047
  const stat = statSync2(file, { bigint: true, throwIfNoEntry: false });
973
1048
  if (!stat) return null;
974
1049
  const identity = `${stat.dev}:${stat.ino}:${stat.size}:${stat.mtimeNs}`;
@@ -987,18 +1062,18 @@ function swiftDistributionCompileView(moduleRoot, distribution) {
987
1062
  ([file]) => file.startsWith("host/") || file === SWIFT_DISTRIBUTION_OBJC_SELECTORS
988
1063
  ).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
989
1064
  const digest = createHash4("sha256").update(JSON.stringify(inputs)).digest("hex");
990
- view = path9.join(swiftCacheDir(), "swift-sdk-views", `compile-${digest}`);
1065
+ view = path8.join(swiftCacheDir(), "swift-sdk-views", `compile-${digest}`);
991
1066
  if (!existsSync(view)) {
992
- mkdirSync2(path9.dirname(view), { recursive: true });
1067
+ mkdirSync2(path8.dirname(view), { recursive: true });
993
1068
  const staging = mkdtempSync(`${view}-`);
994
1069
  try {
995
1070
  chmodSync(staging, 493);
996
1071
  for (const [file] of inputs) {
997
1072
  if (!isSwiftResourcePath(file))
998
1073
  throw new Error(`invalid Swift distribution compile path ${file}`);
999
- const destination = path9.join(staging, file);
1000
- mkdirSync2(path9.dirname(destination), { recursive: true });
1001
- copyFileSync(path9.join(moduleRoot, file), destination);
1074
+ const destination = path8.join(staging, file);
1075
+ mkdirSync2(path8.dirname(destination), { recursive: true });
1076
+ copyFileSync(path8.join(moduleRoot, file), destination);
1002
1077
  }
1003
1078
  try {
1004
1079
  renameSync(staging, view);
@@ -1020,19 +1095,19 @@ var REACH_STAGED_FRAMEWORKS = /* @__PURE__ */ new Set(["React"]);
1020
1095
  function swiftModuleInterface(moduleRoot, name) {
1021
1096
  if (REACH_STAGED_FRAMEWORKS.has(name)) return null;
1022
1097
  if (swiftDistributionAt(moduleRoot)) {
1023
- const file = path9.join(moduleRoot, "modules", `${name}-Swift.h`);
1098
+ const file = path8.join(moduleRoot, "modules", `${name}-Swift.h`);
1024
1099
  if (!existsSync(file)) return null;
1025
1100
  const header = clangInterfaceHeader(readFileSync4(file, "utf8"), moduleRoot);
1026
1101
  return { declared: swiftInterfaceDeclarations(header), header };
1027
1102
  }
1028
- const sources = path9.join(moduleRoot, "Sources", name);
1029
- const built = path9.join(moduleRoot, ".build/host", `${name}-Swift.h`);
1103
+ const sources = path8.join(moduleRoot, "Sources", name);
1104
+ const built = path8.join(moduleRoot, ".build/host", `${name}-Swift.h`);
1030
1105
  if (!existsSync(sources) || !existsSync(built)) return null;
1031
1106
  const declared = /* @__PURE__ */ new Set();
1032
1107
  for (const file of readdirSync3(sources, { recursive: true, encoding: "utf8" }))
1033
1108
  if (file.endsWith(".swift"))
1034
1109
  for (const [, objc, subclass] of readFileSync4(
1035
- path9.join(sources, file),
1110
+ path8.join(sources, file),
1036
1111
  "utf8"
1037
1112
  ).matchAll(
1038
1113
  /@objc\((\w+)\)\s+(?:\w+\s+)*?(?:protocol|class)\s|^(?:public|open)\s+(?:final\s+)?class\s+(\w+)\s*:\s*NSObject\b/gm
@@ -1046,7 +1121,7 @@ function swiftModuleInterface(moduleRoot, name) {
1046
1121
  }
1047
1122
  function clangInterfaceHeader(header, moduleRoot) {
1048
1123
  const distribution = swiftDistributionAt(moduleRoot) !== null;
1049
- const frameworks = path9.join(
1124
+ const frameworks = path8.join(
1050
1125
  swiftSharedSdkSourceRoot(moduleRoot, distribution),
1051
1126
  "System/Library/Frameworks"
1052
1127
  );
@@ -1059,7 +1134,7 @@ function clangInterfaceHeader(header, moduleRoot) {
1059
1134
  (_, module, framework) => {
1060
1135
  const imports = [`@import ${framework};`];
1061
1136
  imported.add(framework);
1062
- const directory = distribution ? path9.join(moduleRoot, "modules", module) : path9.join(moduleRoot, "Sources", module, "include");
1137
+ const directory = distribution ? path8.join(moduleRoot, "modules", module) : path8.join(moduleRoot, "Sources", module, "include");
1063
1138
  if (!existsSync(directory)) return imports[0];
1064
1139
  if (!references) {
1065
1140
  references = new Set(header.match(/\b[A-Z]\w*\b/g));
@@ -1088,7 +1163,7 @@ var clangDeclarationEnumCache = /* @__PURE__ */ new Map();
1088
1163
  function clangDeclarationEnums(directory) {
1089
1164
  const cached = clangDeclarationEnumCache.get(directory);
1090
1165
  if (cached) return cached;
1091
- const enums = readdirSync3(directory).filter((file) => file.endsWith(".h")).flatMap((file) => objcEnumerations(readFileSync4(path9.join(directory, file), "utf8")));
1166
+ const enums = readdirSync3(directory).filter((file) => file.endsWith(".h")).flatMap((file) => objcEnumerations(readFileSync4(path8.join(directory, file), "utf8")));
1092
1167
  clangDeclarationEnumCache.set(directory, enums);
1093
1168
  return enums;
1094
1169
  }
@@ -1123,11 +1198,11 @@ function sdkObjCDeclarationOwners(frameworks) {
1123
1198
  const owners = /* @__PURE__ */ new Map();
1124
1199
  for (const framework of readdirSync3(frameworks))
1125
1200
  if (framework.endsWith(".framework")) {
1126
- const headers = path9.join(frameworks, framework, "Headers");
1201
+ const headers = path8.join(frameworks, framework, "Headers");
1127
1202
  if (existsSync(headers)) {
1128
1203
  for (const file of readdirSync3(headers, { recursive: true, encoding: "utf8" }))
1129
1204
  if (file.endsWith(".h")) {
1130
- const header = readFileSync4(path9.join(headers, file), "utf8");
1205
+ const header = readFileSync4(path8.join(headers, file), "utf8");
1131
1206
  for (const name of [
1132
1207
  ...swiftInterfaceDeclarations(header),
1133
1208
  ...objcEnumerations(header),
@@ -1259,7 +1334,7 @@ function swiftModuleInputFiles(root) {
1259
1334
  "toolchain.json"
1260
1335
  ];
1261
1336
  const walk = (dir) => {
1262
- for (const entry of readdirSync3(path9.join(root, dir), {
1337
+ for (const entry of readdirSync3(path8.join(root, dir), {
1263
1338
  withFileTypes: true
1264
1339
  })) {
1265
1340
  const relative = `${dir}/${entry.name}`;
@@ -1280,36 +1355,36 @@ function swiftMacroPlugins(moduleRoot) {
1280
1355
  if (distribution) {
1281
1356
  const view = swiftDistributionCompileView(moduleRoot, distribution);
1282
1357
  return {
1283
- libraries: distribution.plugins.filter((plugin) => path9.basename(plugin) !== "ExpoModulesMacros").map((plugin) => path9.join(view, plugin)),
1284
- executables: distribution.plugins.filter((plugin) => path9.basename(plugin) === "ExpoModulesMacros").map((plugin) => path9.join(view, plugin)),
1358
+ libraries: distribution.plugins.filter((plugin) => path8.basename(plugin) !== "ExpoModulesMacros").map((plugin) => path8.join(view, plugin)),
1359
+ executables: distribution.plugins.filter((plugin) => path8.basename(plugin) === "ExpoModulesMacros").map((plugin) => path8.join(view, plugin)),
1285
1360
  stale: false
1286
1361
  };
1287
1362
  }
1288
1363
  const release = JSON.parse(
1289
- readFileSync4(path9.join(moduleRoot, "toolchain.json"), "utf8")
1364
+ readFileSync4(path8.join(moduleRoot, "toolchain.json"), "utf8")
1290
1365
  ).release;
1291
- const key = createHash4("sha256").update(release).update(`${process.platform}-${process.arch}`).update(readFileSync4(path9.join(moduleRoot, "scripts/build-preview-plugin.sh")));
1366
+ const key = createHash4("sha256").update(release).update(`${process.platform}-${process.arch}`).update(readFileSync4(path8.join(moduleRoot, "scripts/build-preview-plugin.sh")));
1292
1367
  for (const source of [
1293
1368
  "RnxPreviewMacros",
1294
1369
  "FoundationMacros",
1295
1370
  "TipKitMacros",
1296
1371
  "SwiftMacroSupport"
1297
1372
  ]) {
1298
- const sourceDir = path9.join(moduleRoot, "Sources", source);
1373
+ const sourceDir = path8.join(moduleRoot, "Sources", source);
1299
1374
  for (const file of readdirSync3(sourceDir, { withFileTypes: true }).sort(
1300
1375
  (a, b) => a.name.localeCompare(b.name)
1301
1376
  )) {
1302
1377
  if (file.isFile())
1303
- key.update(`${source}/${file.name}\0`).update(readFileSync4(path9.join(sourceDir, file.name)));
1378
+ key.update(`${source}/${file.name}\0`).update(readFileSync4(path8.join(sourceDir, file.name)));
1304
1379
  }
1305
1380
  }
1306
- const dir = path9.join(swiftCacheDir(), "swift-distribution-plugins", key.digest("hex"));
1307
- const stamp = path9.join(dir, "compiler-release");
1381
+ const dir = path8.join(swiftCacheDir(), "swift-distribution-plugins", key.digest("hex"));
1382
+ const stamp = path8.join(dir, "compiler-release");
1308
1383
  const ext = process.platform === "darwin" ? "dylib" : "so";
1309
1384
  const libraries = ["RnxPreviewMacros", "FoundationMacros", "TipKitMacros"].map(
1310
- (name) => path9.join(dir, `lib${name}.${ext}`)
1385
+ (name) => path8.join(dir, `lib${name}.${ext}`)
1311
1386
  );
1312
- const executables = [path9.join(dir, "ExpoModulesMacros")];
1387
+ const executables = [path8.join(dir, "ExpoModulesMacros")];
1313
1388
  return {
1314
1389
  libraries,
1315
1390
  executables,
@@ -1333,21 +1408,21 @@ function gitCleanModuleInputsKey(root, files) {
1333
1408
  const realTop = realpathSync(repoTop);
1334
1409
  const realRoot = realpathSync(root);
1335
1410
  const collapsedDirs = [
1336
- path9.join(realRoot, "Sources"),
1337
- path9.join(realRoot, "cross-import-overlays"),
1338
- path9.join(realRoot, "ios-simulator-stdlib"),
1339
- realpathSync(path9.resolve(realRoot, "../peachsim/sdk/ios"))
1411
+ path8.join(realRoot, "Sources"),
1412
+ path8.join(realRoot, "cross-import-overlays"),
1413
+ path8.join(realRoot, "ios-simulator-stdlib"),
1414
+ realpathSync(path8.resolve(realRoot, "../peachsim/sdk/ios"))
1340
1415
  ];
1341
1416
  const scoped = /* @__PURE__ */ new Set();
1342
1417
  for (const dir of collapsedDirs) {
1343
- const rel = path9.relative(realTop, dir).split(path9.sep).join("/");
1418
+ const rel = path8.relative(realTop, dir).split(path8.sep).join("/");
1344
1419
  if (!rel || rel.startsWith("../")) return null;
1345
1420
  scoped.add(rel);
1346
1421
  }
1347
1422
  for (const file of files) {
1348
- const full = path9.resolve(realRoot, file);
1349
- if (collapsedDirs.some((dir) => full.startsWith(dir + path9.sep))) continue;
1350
- const rel = path9.relative(realTop, full).split(path9.sep).join("/");
1423
+ const full = path8.resolve(realRoot, file);
1424
+ if (collapsedDirs.some((dir) => full.startsWith(dir + path8.sep))) continue;
1425
+ const rel = path8.relative(realTop, full).split(path8.sep).join("/");
1351
1426
  if (!rel || rel.startsWith("../")) return null;
1352
1427
  scoped.add(rel);
1353
1428
  }
@@ -1388,7 +1463,7 @@ function swiftModuleDigest(root) {
1388
1463
  const files = swiftModuleInputFiles(root);
1389
1464
  const stampHash = createHash4("sha256");
1390
1465
  for (const file of files) {
1391
- const stat = statSync2(path9.join(root, file), { bigint: true });
1466
+ const stat = statSync2(path8.join(root, file), { bigint: true });
1392
1467
  stampHash.update(file);
1393
1468
  stampHash.update(
1394
1469
  `${stat.dev}:${stat.ino}:${stat.size}:${stat.mtimeNs}:${stat.ctimeNs}
@@ -1398,14 +1473,14 @@ function swiftModuleDigest(root) {
1398
1473
  const stamp = stampHash.digest("hex");
1399
1474
  const cached = linkedModuleDigests.get(root);
1400
1475
  if (cached?.stamp === stamp) return cached.digest;
1401
- const digestDir = path9.join(swiftCacheDir(), "swift-module-digests");
1402
- const record = path9.join(
1476
+ const digestDir = path8.join(swiftCacheDir(), "swift-module-digests");
1477
+ const record = path8.join(
1403
1478
  digestDir,
1404
1479
  `${createHash4("sha256").update(root).digest("hex")}.json`
1405
1480
  );
1406
1481
  const writeRecord = (target, body) => {
1407
- mkdirSync2(path9.dirname(target), { recursive: true });
1408
- const partial = `${target}.${process.pid}.${randomUUID2()}`;
1482
+ mkdirSync2(path8.dirname(target), { recursive: true });
1483
+ const partial = `${target}.${process.pid}.${randomUUID()}`;
1409
1484
  writeFileSync2(partial, body);
1410
1485
  renameSync(partial, target);
1411
1486
  };
@@ -1418,7 +1493,7 @@ function swiftModuleDigest(root) {
1418
1493
  }
1419
1494
  }
1420
1495
  const gitKey = gitCleanModuleInputsKey(root, files);
1421
- const gitRecord = gitKey ? path9.join(digestDir, `git-${gitKey}.json`) : null;
1496
+ const gitRecord = gitKey ? path8.join(digestDir, `git-${gitKey}.json`) : null;
1422
1497
  if (gitRecord && existsSync(gitRecord)) {
1423
1498
  const saved = JSON.parse(readFileSync4(gitRecord, "utf8"));
1424
1499
  if (saved && typeof saved === "object" && typeof Reflect.get(saved, "digest") === "string") {
@@ -1433,7 +1508,7 @@ function swiftModuleDigest(root) {
1433
1508
  for (const file of files) {
1434
1509
  hash.update(createHash4("sha256").update(file).digest());
1435
1510
  hash.update(
1436
- createHash4("sha256").update(readFileSync4(path9.join(root, file))).digest()
1511
+ createHash4("sha256").update(readFileSync4(path8.join(root, file))).digest()
1437
1512
  );
1438
1513
  }
1439
1514
  const digest = hash.digest();
@@ -1556,7 +1631,7 @@ function swiftImportNames(contents2, available, defines) {
1556
1631
  function swiftPeachModules(moduleRoot) {
1557
1632
  const distribution = swiftDistributionAt(moduleRoot);
1558
1633
  return distribution ? distribution.modules : swiftManifestDeclarations(
1559
- readFileSync4(path9.join(moduleRoot, "Package.swift"), "utf8")
1634
+ readFileSync4(path8.join(moduleRoot, "Package.swift"), "utf8")
1560
1635
  ).filter((target) => !target.executable && !target.path.startsWith("fixtures/")).map((target) => target.name);
1561
1636
  }
1562
1637
  var sdkPaths = /* @__PURE__ */ new Map();
@@ -1566,7 +1641,7 @@ function swiftSdkPaths(moduleRoot, toolchainBin, options = swiftCompileSdkOption
1566
1641
  const cached = sdkPaths.get(key);
1567
1642
  if (cached) return cached;
1568
1643
  const configuration = execFileSync3(
1569
- path9.join(toolchainBin, "swift"),
1644
+ path8.join(toolchainBin, "swift"),
1570
1645
  ["sdk", "configure", ...options, "--show-configuration", sdk, SWIFT_WASM_TRIPLE],
1571
1646
  { encoding: "utf8", env: swiftEnvironment(), stdio: ["ignore", "pipe", "pipe"] }
1572
1647
  );
@@ -1600,7 +1675,7 @@ function swiftSdkPaths(moduleRoot, toolchainBin, options = swiftCompileSdkOption
1600
1675
  if (flag !== "-fwasm-exceptions") cFlags.push(flag);
1601
1676
  if (flag === "-iframeworkwithsysroot" && options2[index + 2] === "-Xcc" && typeof options2[index + 3] === "string") {
1602
1677
  cFlags.push(options2[index + 3]);
1603
- frameworks.push(path9.join(sysroot, options2[index + 3]));
1678
+ frameworks.push(path8.join(sysroot, options2[index + 3]));
1604
1679
  index += 3;
1605
1680
  continue;
1606
1681
  }
@@ -1617,7 +1692,7 @@ function swiftSdkPaths(moduleRoot, toolchainBin, options = swiftCompileSdkOption
1617
1692
  }
1618
1693
  const paths = {
1619
1694
  sysroot,
1620
- darwin: path9.join(sysroot, "darwin"),
1695
+ darwin: path8.join(sysroot, "darwin"),
1621
1696
  resources: field("swiftResourcesPath"),
1622
1697
  frameworks,
1623
1698
  cFlags
@@ -1688,115 +1763,6 @@ function swiftCodeMask(source) {
1688
1763
  codeMaskChars += source.length;
1689
1764
  return masked;
1690
1765
  }
1691
- function maskSwiftCode(source) {
1692
- const chars = source.split("");
1693
- const blank = (from, to) => {
1694
- for (let i = Math.max(0, from); i < Math.min(to, chars.length); i++)
1695
- if (chars[i] !== "\n") chars[i] = " ";
1696
- };
1697
- const hashesAt = (at) => {
1698
- let end = at;
1699
- while (source[end] === "#") end++;
1700
- return end - at;
1701
- };
1702
- const scanString = (quote, hashes) => {
1703
- const multiline = source.startsWith('"""', quote);
1704
- let i = quote + (multiline ? 3 : 1);
1705
- const keep = [];
1706
- const quoteEnd = (at) => {
1707
- const mark = multiline ? '"""' : '"';
1708
- return source.startsWith(mark, at) && source.startsWith("#".repeat(hashes), at + mark.length);
1709
- };
1710
- while (i < chars.length) {
1711
- if (source[i] === "\\" && source.startsWith("#".repeat(hashes), i + 1)) {
1712
- const escaped = i + 1 + hashes;
1713
- if (source[escaped] === "(") {
1714
- const codeStart = escaped + 1;
1715
- const codeEnd = scanCode(codeStart, true);
1716
- keep.push([codeStart, codeEnd]);
1717
- i = codeEnd + 1;
1718
- } else {
1719
- i = escaped + 1;
1720
- }
1721
- continue;
1722
- }
1723
- if (quoteEnd(i)) {
1724
- const close = i + (multiline ? 3 : 1) + hashes;
1725
- let cursor = quote - hashes;
1726
- const ranges = [...keep, [close, close]];
1727
- for (const [from, to] of ranges)
1728
- if (from > cursor) {
1729
- blank(cursor, from);
1730
- cursor = to;
1731
- } else cursor = Math.max(cursor, to);
1732
- return close;
1733
- }
1734
- i++;
1735
- }
1736
- blank(quote - hashes, chars.length);
1737
- return chars.length;
1738
- };
1739
- const scanCode = (i, nested) => {
1740
- let parens = 0;
1741
- while (i < chars.length) {
1742
- const char = source[i];
1743
- if (char === "/" && source[i + 1] === "/") {
1744
- const end = source.indexOf("\n", i);
1745
- blank(i, end === -1 ? chars.length : end);
1746
- i = end === -1 ? chars.length : end;
1747
- continue;
1748
- }
1749
- if (char === "/" && source[i + 1] === "*") {
1750
- let j = i + 2;
1751
- let depth = 1;
1752
- while (j < chars.length && depth > 0) {
1753
- if (source.startsWith("/*", j)) {
1754
- depth++;
1755
- j += 2;
1756
- } else if (source.startsWith("*/", j)) {
1757
- depth--;
1758
- j += 2;
1759
- } else j++;
1760
- }
1761
- blank(i, j);
1762
- i = j;
1763
- continue;
1764
- }
1765
- if (char === "#") {
1766
- const hashes = hashesAt(i);
1767
- const at = i + hashes;
1768
- if (source[at] === '"') {
1769
- i = scanString(at, hashes);
1770
- continue;
1771
- }
1772
- if (hashes > 0 && source[at] === "/") {
1773
- const mark = "#".repeat(hashes);
1774
- let j = at + 1;
1775
- while (j < chars.length && !(source[j] === "/" && source.startsWith(mark, j + 1)))
1776
- j++;
1777
- blank(i, Math.min(chars.length, j + 1 + hashes));
1778
- i = Math.min(chars.length, j + 1 + hashes);
1779
- continue;
1780
- }
1781
- i++;
1782
- continue;
1783
- }
1784
- if (char === '"') {
1785
- i = scanString(i, 0);
1786
- continue;
1787
- }
1788
- if (char === "(") parens++;
1789
- else if (char === ")") {
1790
- if (nested && parens === 0) return i;
1791
- parens--;
1792
- }
1793
- i++;
1794
- }
1795
- return i;
1796
- };
1797
- scanCode(0, false);
1798
- return chars.join("");
1799
- }
1800
1766
  var FOUNDATION_NETWORKING_TYPES = /* @__PURE__ */ new Set([
1801
1767
  "NSURLConnection",
1802
1768
  "NSURLConnectionDataDelegate",
@@ -2306,7 +2272,7 @@ function swiftCDefinedNames(sources) {
2306
2272
  return names;
2307
2273
  }
2308
2274
  function swiftModuleCompiler(root) {
2309
- const pin = swiftDistributionAt(root) ?? JSON.parse(readFileSync4(path9.join(root, "toolchain.json"), "utf8"));
2275
+ const pin = swiftDistributionAt(root) ?? JSON.parse(readFileSync4(path8.join(root, "toolchain.json"), "utf8"));
2310
2276
  return {
2311
2277
  release: pin.release,
2312
2278
  toolchainBin: swiftCompiler(pin.release)
@@ -2317,6 +2283,42 @@ function swiftModuleToolchain(root) {
2317
2283
  return { release, toolchainBin: swiftToolchain(release, swiftModuleSdk(root)) };
2318
2284
  }
2319
2285
 
2286
+ // src/home-paths.ts
2287
+ import { randomUUID as randomUUID2 } from "node:crypto";
2288
+ import fs4 from "node:fs";
2289
+ import { homedir } from "node:os";
2290
+ import path9 from "node:path";
2291
+ var PEACH_HOME_ENV = "PEACH_HOME";
2292
+ var ACTIVE_RUNTIME_FILE = "active";
2293
+ function ambientHomeDir() {
2294
+ return path9.join(homedir(), ".peach");
2295
+ }
2296
+ function rnxHomeDir() {
2297
+ const override = process.env[PEACH_HOME_ENV];
2298
+ return override && override.length > 0 ? path9.resolve(override) : ambientHomeDir();
2299
+ }
2300
+ function runtimesDir() {
2301
+ return path9.join(rnxHomeDir(), "runtimes");
2302
+ }
2303
+ function runtimeDir(version) {
2304
+ return path9.join(runtimesDir(), version);
2305
+ }
2306
+ function activeRuntimeFile() {
2307
+ return path9.join(runtimesDir(), ACTIVE_RUNTIME_FILE);
2308
+ }
2309
+ function cacheDir() {
2310
+ return path9.join(rnxHomeDir(), "cache");
2311
+ }
2312
+ function readActiveRuntime() {
2313
+ try {
2314
+ const value = fs4.readFileSync(activeRuntimeFile(), "utf8").trim();
2315
+ return value.length > 0 ? value : null;
2316
+ } catch {
2317
+ return null;
2318
+ }
2319
+ }
2320
+ var DAEMON_LOCKFILE_MAX_BYTES = 16 * 1024;
2321
+
2320
2322
  // ../contrast-runtime-delivery/src/index.ts
2321
2323
  import { spawn } from "node:child_process";
2322
2324
  import crypto from "node:crypto";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2746 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2748 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/is-record.ts
4
4
  function isRecord(value) {
@@ -1,21 +1,21 @@
1
- /*! peach v0.1.2746 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2748 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  LAUNCH_METADATA_KEYS,
4
4
  LAUNCH_METADATA_KEYS_PATH
5
- } from "./chunk-4IWPN4FR.mjs";
5
+ } from "./chunk-U5SZIAIF.mjs";
6
6
  import {
7
7
  cacheDir,
8
8
  parseSwiftDistributionLock,
9
9
  readActiveRuntime,
10
10
  runtimeDir
11
- } from "./chunk-LCAHUXRX.mjs";
11
+ } from "./chunk-UFQHPARI.mjs";
12
12
  import {
13
13
  SWIFT_WASM_TRIPLE,
14
14
  registerSwiftHostCompiler
15
- } from "./chunk-4NBVXIZE.mjs";
15
+ } from "./chunk-A2EC74CI.mjs";
16
16
  import {
17
17
  isRecord
18
- } from "./chunk-RHXTAMFH.mjs";
18
+ } from "./chunk-UNOAFCHH.mjs";
19
19
 
20
20
  // src/swift-distribution.ts
21
21
  import { execFile as execFile2 } from "node:child_process";
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2746 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2748 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/plist.ts
4
4
  var NAMED_ENTITIES = {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2746 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2748 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // ../contrast-runtime-delivery/src/version.ts
4
4
  function isValidRuntimeVersion(value) {