peachsim 0.1.2609 → 0.1.2610

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 (147) hide show
  1. package/cli/commands/perf-native.ts +120 -6
  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 +60485 -60177
  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-P6Q3SN6U.mjs → acorn-L2SFCOHG.mjs} +3 -3
  28. package/dist-lib/esm-chunks/{chunk-CJLXAXGU.mjs → chunk-2LJTZ2KG.mjs} +17 -328
  29. package/dist-lib/esm-chunks/{chunk-DN4RY4ZO.mjs → chunk-42NDD4R7.mjs} +1 -1
  30. package/dist-lib/esm-chunks/{chunk-MF7HNQ5K.mjs → chunk-73NIGS7D.mjs} +1490 -3950
  31. package/dist-lib/esm-chunks/{chunk-LSNKOL3L.mjs → chunk-CUBTZPSZ.mjs} +1 -1
  32. package/dist-lib/esm-chunks/chunk-EU5WMP5O.mjs +322 -0
  33. package/dist-lib/esm-chunks/{chunk-7JYSTMRO.mjs → chunk-EYSNLE5V.mjs} +1 -1
  34. package/dist-lib/esm-chunks/{chunk-UMKSCALR.mjs → chunk-FP447MCW.mjs} +1 -1
  35. package/dist-lib/esm-chunks/{chunk-2UJG76LY.mjs → chunk-HMTSU22Q.mjs} +1 -1
  36. package/dist-lib/esm-chunks/{chunk-GJZ2ROIK.mjs → chunk-KTAGV5U6.mjs} +14 -12
  37. package/dist-lib/esm-chunks/{chunk-3MJN4KBR.mjs → chunk-MJP4WOSX.mjs} +1 -1
  38. package/dist-lib/esm-chunks/{chunk-3LX34QVB.mjs → chunk-MK4DOEDN.mjs} +1 -1
  39. package/dist-lib/esm-chunks/{chunk-4HCHYS5S.mjs → chunk-N3M5KT33.mjs} +1 -1
  40. package/dist-lib/esm-chunks/{chunk-IHK4FK5A.mjs → chunk-N7XU2WWO.mjs} +1 -1
  41. package/dist-lib/esm-chunks/{chunk-D44BCQPZ.mjs → chunk-RN73P2DY.mjs} +34 -28
  42. package/dist-lib/esm-chunks/{chunk-62CUUMJF.mjs → chunk-VDLPNJ6P.mjs} +1 -1
  43. package/dist-lib/esm-chunks/chunk-W3LNUIUA.mjs +2655 -0
  44. package/dist-lib/esm-chunks/{chunk-T554RY2B.mjs → chunk-WBQFHIGS.mjs} +1 -1
  45. package/dist-lib/esm-chunks/{chunk-5V7JOQMI.mjs → chunk-WZHEW7Z7.mjs} +1 -1
  46. package/dist-lib/esm-chunks/{chunk-FOM5H3FB.mjs → chunk-X74N3K5N.mjs} +4 -4
  47. package/dist-lib/esm-chunks/{chunk-ZUBTL7EH.mjs → chunk-XN74REO2.mjs} +1 -1
  48. package/dist-lib/esm-chunks/{chunk-PKXGC5OZ.mjs → chunk-YLUD2UET.mjs} +1 -1
  49. package/dist-lib/esm-chunks/{chunk-VHBBOWKT.mjs → chunk-YVLXYLNV.mjs} +1 -1
  50. package/dist-lib/esm-chunks/{chunk-L4ATOCRX.mjs → chunk-YYGSN3BN.mjs} +3 -3
  51. package/dist-lib/esm-chunks/{chunk-FIUWBFDV.mjs → chunk-ZZB2LFYV.mjs} +1 -1
  52. package/dist-lib/esm-chunks/{metro-layout-parser-7VIYXTX3.mjs → metro-layout-parser-VDPXJ7LW.mjs} +3 -3
  53. package/dist-lib/esm-chunks/{swift-package-prebuilt-GNRGNGKJ.mjs → swift-package-prebuilt-HRPDLN2P.mjs} +14 -11
  54. package/dist-lib/esm-chunks/{swift-sdk-app-module-QMYD4WKD.mjs → swift-sdk-app-module-5DOGMU3M.mjs} +16 -14
  55. package/dist-lib/esm-chunks/{swift-sdk-image-LUAWELUR.mjs → swift-sdk-image-W3UU4H4L.mjs} +16 -14
  56. package/dist-lib/esm-chunks/{swift-sdk-image-producer-A4Y2EYPV.mjs → swift-sdk-image-producer-OJWD6ZOH.mjs} +8 -6
  57. package/dist-lib/expo-swift-bundle.cjs +42524 -42216
  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 +43719 -43248
  62. package/dist-lib/host/fetch-proxy-handler.cjs +670 -645
  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 +1499 -2889
  76. package/dist-lib/native-app-identity-project.mjs +317 -339
  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 +166 -154
  88. package/dist-lib/public-origins-lib.json +141 -198
  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 +38909 -38438
  96. package/dist-lib/swift-compile.cjs +12239 -12121
  97. package/dist-lib/swift-compile.mjs +36 -33
  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/package.json +1 -1
  124. package/src/binaryen.lock.json +3 -3
  125. package/src/genrule-archives.ts +5 -2
  126. package/src/native-framework-compiler.ts +1 -1
  127. package/src/native-static-libraries.ts +2 -3
  128. package/src/native-swift-slices.ts +1 -1
  129. package/src/nitro-dependencies.ts +3 -7
  130. package/src/one-native-controls-package.ts +165 -11
  131. package/src/oneNativeControlsContract.ts +1 -0
  132. package/src/rive-runtime-dependencies.ts +1 -2
  133. package/src/swift-compile.ts +165 -1796
  134. package/src/swift-compiler-digest.ts +2 -0
  135. package/src/swift-distribution.ts +39 -15
  136. package/src/swift-objc-compile.ts +194 -32
  137. package/src/swift-package-manifest.ts +6 -29
  138. package/src/swift-packages.ts +6 -14
  139. package/src/swift-sdk-surface.ts +1811 -0
  140. package/src/swift-standin-digest.ts +28 -5
  141. package/src/swift-standins.ts +16 -19
  142. package/src/swift-wasm-archive.ts +200 -0
  143. package/src/swift-wasm-prune.ts +3 -93
  144. package/src/swift-wasm64-native-source.ts +4 -2
  145. package/src/swiftWasm64ConfigContract.ts +10 -0
  146. package/src/wasm-optimize.ts +18 -14
  147. package/src/xcode-project.ts +2 -4
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  RNX_SCREEN_CAPTURE_VERSION,
4
4
  describeInvalidScreenCapture,
@@ -10,8 +10,8 @@ import {
10
10
  rnxRasterFrames,
11
11
  rnxRasterRegionRequests,
12
12
  selectRnxRasterNodeIds
13
- } from "./esm-chunks/chunk-T554RY2B.mjs";
14
- import "./esm-chunks/chunk-4HCHYS5S.mjs";
13
+ } from "./esm-chunks/chunk-WBQFHIGS.mjs";
14
+ import "./esm-chunks/chunk-N3M5KT33.mjs";
15
15
  export {
16
16
  RNX_SCREEN_CAPTURE_VERSION,
17
17
  describeInvalidScreenCapture,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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 __defProp = Object.defineProperty;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  AGENT_IDENTITY_MAX_CHARS,
4
4
  RNX_CLOUD_ALL_COMMAND_SCOPES,
@@ -31,8 +31,8 @@ import {
31
31
  readRnxLaunchUrl,
32
32
  rnxCloudCommandScope,
33
33
  rnxCloudScopesAllowCommand
34
- } from "./esm-chunks/chunk-3MJN4KBR.mjs";
35
- import "./esm-chunks/chunk-4HCHYS5S.mjs";
34
+ } from "./esm-chunks/chunk-MJP4WOSX.mjs";
35
+ import "./esm-chunks/chunk-N3M5KT33.mjs";
36
36
  export {
37
37
  AGENT_IDENTITY_MAX_CHARS,
38
38
  RNX_CLOUD_ALL_COMMAND_SCOPES,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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 __defProp = Object.defineProperty;
@@ -1,5 +1,5 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
- import "./esm-chunks/chunk-4HCHYS5S.mjs";
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
+ import "./esm-chunks/chunk-N3M5KT33.mjs";
3
3
 
4
4
  // src/cloud-test-args.ts
5
5
  var CLOUD_TEST_ARGS_MAX_COUNT = 32;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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 __defProp = Object.defineProperty;
@@ -1,10 +1,10 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  sleep
4
- } from "./esm-chunks/chunk-IHK4FK5A.mjs";
4
+ } from "./esm-chunks/chunk-N7XU2WWO.mjs";
5
5
  import {
6
6
  isRnxScreenCapture
7
- } from "./esm-chunks/chunk-T554RY2B.mjs";
7
+ } from "./esm-chunks/chunk-WBQFHIGS.mjs";
8
8
  import {
9
9
  RNX_CLOUD_COMMAND_TYPES,
10
10
  RNX_CLOUD_MAX_ARTIFACT_BYTES,
@@ -14,16 +14,16 @@ import {
14
14
  isRnxCloudCommandType,
15
15
  rnxCloudCommandScope,
16
16
  rnxCloudScopesAllowCommand
17
- } from "./esm-chunks/chunk-3MJN4KBR.mjs";
17
+ } from "./esm-chunks/chunk-MJP4WOSX.mjs";
18
18
  import {
19
19
  rnxPublicBrand
20
- } from "./esm-chunks/chunk-2UJG76LY.mjs";
20
+ } from "./esm-chunks/chunk-HMTSU22Q.mjs";
21
21
  import {
22
22
  isRecord
23
- } from "./esm-chunks/chunk-ZUBTL7EH.mjs";
23
+ } from "./esm-chunks/chunk-XN74REO2.mjs";
24
24
  import {
25
25
  __publicField
26
- } from "./esm-chunks/chunk-4HCHYS5S.mjs";
26
+ } from "./esm-chunks/chunk-N3M5KT33.mjs";
27
27
 
28
28
  // src/backend-origin.ts
29
29
  var NativeURL = globalThis.URL;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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 __defProp = Object.defineProperty;
@@ -1,14 +1,14 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  isValidRuntimeVersion
4
- } from "./esm-chunks/chunk-5V7JOQMI.mjs";
4
+ } from "./esm-chunks/chunk-WZHEW7Z7.mjs";
5
5
  import {
6
6
  findBundleFooter
7
- } from "./esm-chunks/chunk-PKXGC5OZ.mjs";
7
+ } from "./esm-chunks/chunk-YLUD2UET.mjs";
8
8
  import {
9
9
  isRecord
10
- } from "./esm-chunks/chunk-ZUBTL7EH.mjs";
11
- import "./esm-chunks/chunk-4HCHYS5S.mjs";
10
+ } from "./esm-chunks/chunk-XN74REO2.mjs";
11
+ import "./esm-chunks/chunk-N3M5KT33.mjs";
12
12
 
13
13
  // src/nativeViewSourceContract.ts
14
14
  function isNativeViewSource(value) {
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (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;
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
  import {
3
3
  Node,
4
4
  Parser,
@@ -22,8 +22,8 @@ import {
22
22
  types,
23
23
  types$1,
24
24
  version
25
- } from "./chunk-FIUWBFDV.mjs";
26
- import "./chunk-4HCHYS5S.mjs";
25
+ } from "./chunk-ZZB2LFYV.mjs";
26
+ import "./chunk-N3M5KT33.mjs";
27
27
  export {
28
28
  Node,
29
29
  Parser,
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/swiftTargetContract.ts
4
4
  var SWIFT_WASM_TRIPLE = "wasm64-unknown-wasip1-threads";
@@ -344,7 +344,7 @@ for arg in "$@"; do
344
344
  case $arg in
345
345
  @*)
346
346
  rsp=\${arg#@}
347
- awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next }${omitLibraries.map((name2) => ` $0 == "\\"-l${name2}\\"" { next }`).join("")} $0 == "\\"-ObjC\\"" { next } { print }' "$rsp" > "$rsp.dedup"
347
+ awk 'BEGIN { RS = " "; ORS = " " } /^"-l/ { if (seen[$0]++) next }${omitLibraries.map((name) => ` $0 == "\\"-l${name}\\"" { next }`).join("")} $0 == "\\"-ObjC\\"" { next } { print }' "$rsp" > "$rsp.dedup"
348
348
  mv "$rsp.dedup" "$rsp"
349
349
  if [ "\${PEACH_DEFER_WASM_LINK:-}" = "1" ] && grep -q '"--start-lib"' "$rsp"; then
350
350
  cp "$rsp" ${JSON.stringify(path.join(directory, ".peach-link.rsp"))}
@@ -452,9 +452,9 @@ function refreshSwiftCacheHold(directory) {
452
452
  function swiftPackageCacheOptions() {
453
453
  const root = path.join(swiftCacheDir(), "swiftpm");
454
454
  return [
455
- ...["cache", "config", "security"].flatMap((name2) => [
456
- `--${name2}-path`,
457
- path.join(root, name2)
455
+ ...["cache", "config", "security"].flatMap((name) => [
456
+ `--${name}-path`,
457
+ path.join(root, name)
458
458
  ]),
459
459
  "--disable-keychain"
460
460
  ];
@@ -571,7 +571,7 @@ function swiftSdkPayloadChecksum(bundle) {
571
571
  hash.update(JSON.stringify([relative, "link", fs.readlinkSync(file)]) + "\n");
572
572
  } else if (stat.isDirectory()) {
573
573
  hash.update(JSON.stringify([relative, "directory"]) + "\n");
574
- for (const name2 of fs.readdirSync(file).sort()) visit(path.join(relative, name2));
574
+ for (const name of fs.readdirSync(file).sort()) visit(path.join(relative, name));
575
575
  } else if (stat.isFile()) {
576
576
  const stamp = [stat.dev, stat.ino, stat.size, stat.mtimeNs, stat.ctimeNs].join(":");
577
577
  let cached = sdkFileHashes.get(file);
@@ -770,12 +770,12 @@ function swiftCompilerInstall(release) {
770
770
  };
771
771
  }
772
772
  const platform = `debian12${process.arch === "arm64" ? "-aarch64" : ""}`;
773
- const name2 = `${release}-${platform}`;
773
+ const name = `${release}-${platform}`;
774
774
  return {
775
775
  note: " (Debian 12 shown; other distributions: https://www.swift.org/install/linux/)",
776
776
  commands: [
777
- `curl -fsSL ${downloads}/${platform}/${release}/${name2}.tar.gz | tar -xz -C /opt`,
778
- `export PATH=/opt/${name2}/usr/bin:$PATH`
777
+ `curl -fsSL ${downloads}/${platform}/${release}/${name}.tar.gz | tar -xz -C /opt`,
778
+ `export PATH=/opt/${name}/usr/bin:$PATH`
779
779
  ]
780
780
  };
781
781
  }
@@ -821,13 +821,13 @@ function readProcessTable(timeoutMs = 1e4, pid) {
821
821
  const deadline = Date.now() + timeoutMs;
822
822
  const rows2 = [];
823
823
  const names = pid === void 0 ? readdirSync("/proc") : [String(pid)];
824
- for (const name2 of names) {
825
- if (!/^\d+$/.test(name2)) continue;
824
+ for (const name of names) {
825
+ if (!/^\d+$/.test(name)) continue;
826
826
  if (Date.now() >= deadline)
827
827
  throw new Error("process inspection exceeded its deadline");
828
828
  let stat;
829
829
  try {
830
- stat = readFileSync(`/proc/${name2}/stat`, "utf8");
830
+ stat = readFileSync(`/proc/${name}/stat`, "utf8");
831
831
  } catch (error) {
832
832
  if (error instanceof Error && "code" in error && (error.code === "ENOENT" || error.code === "ESRCH"))
833
833
  continue;
@@ -837,9 +837,9 @@ function readProcessTable(timeoutMs = 1e4, pid) {
837
837
  const pgid = Number(fields[2]);
838
838
  const ticks = Number(fields[19]);
839
839
  if (!fields[0] || !Number.isSafeInteger(pgid) || !Number.isSafeInteger(ticks))
840
- throw new Error(`unreadable process table row for ${name2}`);
840
+ throw new Error(`unreadable process table row for ${name}`);
841
841
  rows2.push({
842
- pid: Number(name2),
842
+ pid: Number(name),
843
843
  pgid,
844
844
  zombie: fields[0] === "Z" || fields[0] === "X",
845
845
  start: bootMs + ticks * 1e3 / clockTicks
@@ -1239,315 +1239,6 @@ function windowAdmission() {
1239
1239
  };
1240
1240
  }
1241
1241
 
1242
- // src/swift-root-lock.ts
1243
- import {
1244
- spawn as spawn3
1245
- } from "node:child_process";
1246
- import { createHash as createHash2, randomUUID } from "node:crypto";
1247
- import {
1248
- closeSync,
1249
- existsSync,
1250
- linkSync,
1251
- mkdirSync,
1252
- openSync,
1253
- readdirSync as readdirSync3,
1254
- readFileSync as readFileSync3,
1255
- realpathSync,
1256
- rmSync as rmSync2,
1257
- writeFileSync as writeFileSync2
1258
- } from "node:fs";
1259
- import { homedir } from "node:os";
1260
- import path2 from "node:path";
1261
- var POLL_MS = 250;
1262
- var INSPECT_ATTEMPTS = 5;
1263
- var START_TOLERANCE_MS = 2e3;
1264
- function errorCode(error) {
1265
- return error instanceof Error && "code" in error && typeof error.code === "string" ? error.code : void 0;
1266
- }
1267
- function processTable(pid) {
1268
- try {
1269
- return readProcessTable(void 0, pid);
1270
- } catch (error) {
1271
- throw new Error(
1272
- `swift root lock cannot read the process table: ${error instanceof Error ? error.message : String(error)}`
1273
- );
1274
- }
1275
- }
1276
- async function processTableWithRetry(pid, signal) {
1277
- for (let attempt = 1; ; attempt++) {
1278
- try {
1279
- return processTable(pid);
1280
- } catch (error) {
1281
- if (attempt >= INSPECT_ATTEMPTS) throw error;
1282
- await pause(POLL_MS * attempt, signal);
1283
- signal?.throwIfAborted();
1284
- }
1285
- }
1286
- }
1287
- function sameProcess(row, identity) {
1288
- return row.pid === identity.pid && Math.abs(row.start - identity.start) <= START_TOLERANCE_MS;
1289
- }
1290
- function ownIdentity(pid) {
1291
- const row = processTable(pid).find(
1292
- (candidate) => candidate.pid === pid && !candidate.zombie
1293
- );
1294
- if (!row) throw new Error(`swift root lock cannot find process ${pid}`);
1295
- return { pid, start: row.start };
1296
- }
1297
- function parseIdentity(text) {
1298
- const value = JSON.parse(text);
1299
- if (value && typeof value === "object" && "pid" in value && typeof value.pid === "number" && Number.isInteger(value.pid) && value.pid > 1 && "start" in value && typeof value.start === "number")
1300
- return { pid: value.pid, start: value.start };
1301
- throw new Error(`swift root lock record is not a process identity: ${text}`);
1302
- }
1303
- function pause(ms, signal) {
1304
- return new Promise((resolve) => {
1305
- const done = () => {
1306
- clearTimeout(timer);
1307
- signal?.removeEventListener("abort", done);
1308
- resolve();
1309
- };
1310
- const timer = setTimeout(done, ms);
1311
- signal?.addEventListener("abort", done, { once: true });
1312
- });
1313
- }
1314
- var name = (number, suffix) => `${String(number).padStart(12, "0")}.${suffix}`;
1315
- function generationNumbers(directory) {
1316
- const numbers = /* @__PURE__ */ new Set();
1317
- for (const entry of readdirSync3(directory)) {
1318
- const match = /^(\d{12})\./.exec(entry);
1319
- if (match) numbers.add(Number(match[1]));
1320
- }
1321
- return [...numbers].sort((a, b) => a - b);
1322
- }
1323
- function readGeneration(directory, number) {
1324
- let owner;
1325
- try {
1326
- owner = readFileSync3(path2.join(directory, name(number, "owner")), "utf8");
1327
- } catch (error) {
1328
- if (errorCode(error) === "ENOENT") return null;
1329
- throw error;
1330
- }
1331
- return {
1332
- number,
1333
- holder: parseIdentity(owner),
1334
- released: readdirSync3(directory).includes(name(number, "released"))
1335
- };
1336
- }
1337
- function readChildren(directory, number) {
1338
- const prefix = name(number, "child.");
1339
- return readdirSync3(directory).filter((entry) => entry.startsWith(prefix)).map((entry) => parseIdentity(readFileSync3(path2.join(directory, entry), "utf8")));
1340
- }
1341
- function groupAlive(table, leader) {
1342
- const row = table.find((candidate) => candidate.pid === leader.pid);
1343
- if (row && !sameProcess(row, leader)) return false;
1344
- return table.some((candidate) => candidate.pgid === leader.pid && !candidate.zombie);
1345
- }
1346
- function linuxMountPath(existing) {
1347
- const fd = openSync(existing, "r");
1348
- try {
1349
- const mountId = /^mnt_id:\s+(\d+)$/m.exec(
1350
- readFileSync3("/proc/self/fdinfo/" + fd, "utf8")
1351
- )?.[1];
1352
- const mount = readFileSync3("/proc/self/mountinfo", "utf8").split("\n").find((line) => line.startsWith(mountId + " "))?.split(" ");
1353
- if (!mount?.[4]) throw new Error("cannot identify Swift build mount for " + existing);
1354
- const decode = (value) => value.replace(
1355
- /\\([0-7]{3})/g,
1356
- (_, octal) => String.fromCharCode(parseInt(octal, 8))
1357
- );
1358
- return mount[2] + ":" + path2.join(decode(mount[3]), path2.relative(decode(mount[4]), existing));
1359
- } finally {
1360
- closeSync(fd);
1361
- }
1362
- }
1363
- function rootLockKey(root) {
1364
- let existing = path2.resolve(root);
1365
- const missing = [];
1366
- while (!existsSync(existing) && path2.dirname(existing) !== existing) {
1367
- missing.unshift(path2.basename(existing));
1368
- existing = path2.dirname(existing);
1369
- }
1370
- existing = realpathSync(existing);
1371
- const backingPath = process.platform === "linux" ? linuxMountPath(existing) : existing;
1372
- return path2.join(backingPath, ...missing);
1373
- }
1374
- function swiftRootLocksDir() {
1375
- return path2.join(homedir(), ".peach", "cache", "swift-root-locks");
1376
- }
1377
- function lockDirectoryFor(root) {
1378
- const directory = path2.join(
1379
- swiftRootLocksDir(),
1380
- createHash2("sha256").update(rootLockKey(root)).digest("hex").slice(0, 32)
1381
- );
1382
- mkdirSync(directory, { recursive: true });
1383
- return directory;
1384
- }
1385
- function acquireSwiftRootReadHold(root) {
1386
- const directory = lockDirectoryFor(root);
1387
- const token = randomUUID();
1388
- const pending = path2.join(directory, `pending.reader.${token}`);
1389
- const reader = path2.join(directory, `reader.${token}`);
1390
- writeFileSync2(pending, JSON.stringify(ownIdentity(process.pid)));
1391
- try {
1392
- linkSync(pending, reader);
1393
- } finally {
1394
- rmSync2(pending, { force: true });
1395
- }
1396
- let released = false;
1397
- return {
1398
- release() {
1399
- if (released) return;
1400
- released = true;
1401
- rmSync2(reader, { force: true });
1402
- }
1403
- };
1404
- }
1405
- async function hasLiveSwiftRootReaders(root, signal) {
1406
- const directory = lockDirectoryFor(root);
1407
- const entries = readdirSync3(directory).filter((entry) => entry.startsWith("reader."));
1408
- if (entries.length === 0) return false;
1409
- for (const entry of entries) {
1410
- const file = path2.join(directory, entry);
1411
- let text;
1412
- try {
1413
- text = readFileSync3(file, "utf8");
1414
- } catch (error) {
1415
- if (errorCode(error) === "ENOENT") continue;
1416
- throw error;
1417
- }
1418
- const identity = parseIdentity(text);
1419
- const rows = await processTableWithRetry(identity.pid, signal);
1420
- if (rows.some((row) => !row.zombie && sameProcess(row, identity))) return true;
1421
- rmSync2(file, { force: true });
1422
- }
1423
- return false;
1424
- }
1425
- async function waitForNoSwiftRootReaders(root, signal) {
1426
- let announced = false;
1427
- while (await hasLiveSwiftRootReaders(root, signal)) {
1428
- signal?.throwIfAborted();
1429
- if (!announced) {
1430
- announced = true;
1431
- process.stderr.write(`[swift-root-lock] waiting for readers of ${root}
1432
- `);
1433
- }
1434
- await pause(POLL_MS, signal);
1435
- }
1436
- }
1437
- async function withSwiftRootLock(root, work, signal, wait = true) {
1438
- const directory = lockDirectoryFor(root);
1439
- const token = randomUUID();
1440
- const ownRow = (await processTableWithRetry(process.pid, signal)).find(
1441
- (candidate) => candidate.pid === process.pid && !candidate.zombie
1442
- );
1443
- if (!ownRow) throw new Error(`swift root lock cannot find process ${process.pid}`);
1444
- const owner = JSON.stringify({ pid: process.pid, start: ownRow.start });
1445
- const pending = path2.join(directory, `pending.${token}`);
1446
- let held = 0;
1447
- let announced = 0;
1448
- let current = null;
1449
- const waiting = async (reason) => {
1450
- if (announced !== current?.number) {
1451
- announced = current?.number ?? 0;
1452
- process.stderr.write(`[swift-root-lock] waiting for ${root}: ${reason}
1453
- `);
1454
- }
1455
- await pause(POLL_MS, signal);
1456
- };
1457
- for (; ; ) {
1458
- signal?.throwIfAborted();
1459
- const newest = generationNumbers(directory).at(-1) ?? 0;
1460
- current = newest > 0 ? readGeneration(directory, newest) : null;
1461
- if (newest > 0 && !current) continue;
1462
- if (current && !current.released) {
1463
- const { holder: identity } = current;
1464
- const holder = await processTableWithRetry(identity.pid, signal);
1465
- if (holder.some((row) => !row.zombie && sameProcess(row, identity))) {
1466
- if (!wait) return void 0;
1467
- await waiting(`held by pid ${identity.pid}`);
1468
- continue;
1469
- }
1470
- const children2 = readChildren(directory, newest);
1471
- if (children2.length) {
1472
- const table = await processTableWithRetry(void 0, signal);
1473
- const orphaned = children2.filter((child) => groupAlive(table, child));
1474
- if (orphaned.length) {
1475
- if (!wait) return void 0;
1476
- for (const child of orphaned) killOrphanedProcessGroup(child.pid);
1477
- await waiting(
1478
- `stopping compiler groups ${orphaned.map((child) => child.pid).join(", ")} left by dead pid ${identity.pid}`
1479
- );
1480
- continue;
1481
- }
1482
- }
1483
- }
1484
- writeFileSync2(pending, owner);
1485
- try {
1486
- linkSync(pending, path2.join(directory, name(newest + 1, "owner")));
1487
- } catch (error) {
1488
- if (errorCode(error) === "EEXIST") continue;
1489
- throw error;
1490
- } finally {
1491
- rmSync2(pending, { force: true });
1492
- }
1493
- const numbers = generationNumbers(directory);
1494
- if (numbers.at(-1) !== newest + 1) {
1495
- rmSync2(path2.join(directory, name(newest + 1, "owner")), { force: true });
1496
- continue;
1497
- }
1498
- held = newest + 1;
1499
- for (const number of numbers)
1500
- if (number < held) {
1501
- for (const entry of readdirSync3(directory))
1502
- if (entry.startsWith(name(number, "")))
1503
- rmSync2(path2.join(directory, entry), { force: true });
1504
- }
1505
- break;
1506
- }
1507
- const children = [];
1508
- const lease = {
1509
- register(child) {
1510
- const index = children.push(child);
1511
- if (child.pid === void 0) throw new Error("could not register compiler process");
1512
- const childPending = `${pending}.child.${index}`;
1513
- try {
1514
- writeFileSync2(childPending, JSON.stringify(ownIdentity(child.pid)));
1515
- linkSync(childPending, path2.join(directory, name(held, `child.${index}`)));
1516
- } finally {
1517
- rmSync2(childPending, { force: true });
1518
- }
1519
- },
1520
- spawn(command, args, options, companion) {
1521
- const child = spawn3(
1522
- "/bin/sh",
1523
- ["-c", 'IFS= read -r go || exit 1; exec "$@" </dev/null', "sh", command, ...args],
1524
- { ...options, detached: true, stdio: ["pipe", "pipe", "pipe"] }
1525
- );
1526
- child.stdin.on("error", () => {
1527
- });
1528
- if (child.pid === void 0) {
1529
- child.stdin.destroy();
1530
- return child;
1531
- }
1532
- try {
1533
- lease.register(child);
1534
- companion?.register(child);
1535
- } catch (error) {
1536
- child.stdin.destroy();
1537
- throw error;
1538
- }
1539
- child.stdin.end("go\n");
1540
- return child;
1541
- }
1542
- };
1543
- try {
1544
- return await work(lease);
1545
- } finally {
1546
- await Promise.all(children.map((child) => terminateProcessGroup(child, "SIGKILL", 0)));
1547
- writeFileSync2(path2.join(directory, name(held, "released")), "");
1548
- }
1549
- }
1550
-
1551
1242
  export {
1552
1243
  SWIFT_WASM_TRIPLE,
1553
1244
  wasmThreadFlags,
@@ -1568,10 +1259,8 @@ export {
1568
1259
  swiftToolchain,
1569
1260
  swiftFileChecksum,
1570
1261
  swiftCompiler,
1262
+ readProcessTable,
1263
+ killOrphanedProcessGroup,
1571
1264
  terminateProcessGroup,
1572
- windowAdmission,
1573
- acquireSwiftRootReadHold,
1574
- hasLiveSwiftRootReaders,
1575
- waitForNoSwiftRootReaders,
1576
- withSwiftRootLock
1265
+ windowAdmission
1577
1266
  };
@@ -1,4 +1,4 @@
1
- /*! peach v0.1.2609 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
1
+ /*! peach v0.1.2610 | (c) 2026 Tamagui LLC | Proprietary; see LICENSE */
2
2
 
3
3
  // src/launchMetadataContract.ts
4
4
  var LAUNCH_METADATA_QUERY_PARAM = "launchMetadata";