stim 1.23.1 → 1.25.0

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 (174) hide show
  1. package/README.md +3 -2
  2. package/dist/{acquire-artifact-BzYRDgaP.mjs → acquire-artifact-zA4S7RHE.mjs} +2 -2
  3. package/dist/{act-vxiMwdf5.mjs → act-BbHS3oV8.mjs} +41 -26
  4. package/dist/{activity-BpWUPgUm.mjs → activity-BpjwrQXU.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-CUlLsbRt.mjs → agent-device-usage-output-Bnkerfod.mjs} +5 -5
  6. package/dist/{android-DtfRGLcc.mjs → android-BGwuK3Mc.mjs} +75 -50
  7. package/dist/{android-CLi6DSiS.mjs → android-CNZgRC-4.mjs} +5 -5
  8. package/dist/{android-C7sVmyI9.mjs → android-Cjcj8MCw.mjs} +140 -46
  9. package/dist/{android-cas-ngferVq2.mjs → android-cas-BVqh2Zep.mjs} +3 -3
  10. package/dist/android-cas-compiler.mjs +1 -1
  11. package/dist/{android-project-DVWyCbWU.d.mts → android-project-CTYaETc0.d.mts} +6 -2
  12. package/dist/{android-DR5lZ2Az.mjs → android-saBeB4lr.mjs} +13 -3
  13. package/dist/api.d.mts +22 -5
  14. package/dist/api.mjs +32 -31
  15. package/dist/{artifact-Xvgibgzq.mjs → artifact-Co8zixVx.mjs} +19 -17
  16. package/dist/{artifact-DBI3DALs.mjs → artifact-DN8JNwqS.mjs} +18 -17
  17. package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
  18. package/dist/{browser-web-BJN9ZHxB.mjs → browser-web-CCgZsHmI.mjs} +16 -17
  19. package/dist/{budget-3ivAK99e.mjs → budget-HyShrIpL.mjs} +149 -47
  20. package/dist/{build-Dv9s8Fz-.mjs → build-CAiw8Ezm.mjs} +33 -29
  21. package/dist/{build-cache-Dv7RN200.mjs → build-cache-CKCzxzxA.mjs} +172 -21
  22. package/dist/{build-plan-BmbdHQbr.mjs → build-plan-zCuHGlA8.mjs} +8 -7
  23. package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
  24. package/dist/cache-manifest.mjs +1 -1
  25. package/dist/{ccache-CH2EWGPB.mjs → ccache-h1FKhZeg.mjs} +6 -6
  26. package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
  27. package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
  28. package/dist/{cli-BkK6Wr5i.mjs → cli-C4w607Pz.mjs} +20 -20
  29. package/dist/cli.mjs +1 -1
  30. package/dist/{client-B4MMzfo_.mjs → client-BQsmyp_-.mjs} +274 -39
  31. package/dist/collector-run.mjs +6 -6
  32. package/dist/{command-output-YKGWivpG.mjs → command-output-BBvS1H6v.mjs} +3 -2
  33. package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
  34. package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
  35. package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-BwNCYG5Q.mjs} +2 -2
  36. package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
  37. package/dist/{dev-client-BFxiDpkf.mjs → dev-client-CHoXXZeg.mjs} +3 -3
  38. package/dist/{device-CiNYxqp6.mjs → device-B9FqTBYW.mjs} +81 -54
  39. package/dist/{device-B7ljwccX.mjs → device-F5-4z9ef.mjs} +16 -16
  40. package/dist/{device-capacity-DH0QsZYZ.mjs → device-capacity-ZYaRALv5.mjs} +20 -16
  41. package/dist/device-host-worker.mjs +17 -17
  42. package/dist/{device-ios-CbVDtDIy.mjs → device-ios-DkHBrmvH.mjs} +32 -50
  43. package/dist/{device-lease-run-DXPSwdbb.mjs → device-lease-run-ogEeJ62K.mjs} +6 -6
  44. package/dist/{device-pool-B4iOXIrD.mjs → device-pool-BIg8MU8l.mjs} +3 -3
  45. package/dist/{doctor-DRu-8ld6.mjs → doctor-A_Nr_fDe.mjs} +1 -1
  46. package/dist/{doctor-HUC1igzw.mjs → doctor-Bm8TVpGn.mjs} +37 -31
  47. package/dist/{doctor-fingerprint-DZLoYFVb.mjs → doctor-fingerprint-zlujA1Gs.mjs} +1 -1
  48. package/dist/doctor-fingerprint.mjs +1 -1
  49. package/dist/{doctor-C6t4Maue.mjs → doctor-k3P3PizH.mjs} +14 -14
  50. package/dist/{doctor-watchman-iGBpC6KM.mjs → doctor-watchman-BovI1y3-.mjs} +5 -5
  51. package/dist/{eas-build-DMWSSvxq.mjs → eas-build-CyDKNTBP.mjs} +4 -4
  52. package/dist/{eas-fallback-vKlrqxgE.mjs → eas-fallback-gaZi-dJL.mjs} +16 -15
  53. package/dist/{eas-session-ledger-BQF9Yyy9.mjs → eas-session-ledger-BMCA1gdO.mjs} +12 -8
  54. package/dist/{error-diagnostics-DYsjJIHz.mjs → error-diagnostics-B1Mj_-7h.mjs} +17 -42
  55. package/dist/{errors-ccaPc4ox.mjs → errors-DHm_U5gv.mjs} +2 -1
  56. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  57. package/dist/{gc-BW8E1uSC.mjs → gc-B9jcnmIk.mjs} +205 -28
  58. package/dist/{gc-dDE4QPVu.mjs → gc-eaz403W6.mjs} +2 -2
  59. package/dist/{guide-DYYEO3Wz.mjs → guide-DR0K0xW9.mjs} +328 -89
  60. package/dist/{hosted-android-xcfgCgSF.mjs → hosted-android-Bvb2-ZxD.mjs} +4 -4
  61. package/dist/{hosted-client-Bt-tndxV.mjs → hosted-client-rsRqysJc.mjs} +4 -4
  62. package/dist/{hosted-ios-y19jCYFF.mjs → hosted-ios-RtVcJH3u.mjs} +1 -1
  63. package/dist/{hosted-logs-DzJKzKlj.mjs → hosted-logs-CWKGYWNX.mjs} +11 -6
  64. package/dist/{hosted-macos-BJusKvqL.mjs → hosted-macos-d0pv9Tth.mjs} +7 -7
  65. package/dist/{hosted-native-BmQC6U_x.mjs → hosted-native-BxTizGU2.mjs} +58 -11
  66. package/dist/{idle-shutdown-CJmUOV5x.mjs → idle-shutdown-BIyfl0Zj.mjs} +10 -10
  67. package/dist/{ios-hcBpnEGk.mjs → ios-BQzvJlzw.mjs} +122 -17
  68. package/dist/{ios-CWjqfSm_.mjs → ios-BRVM8b0P.mjs} +81 -49
  69. package/dist/{ios-DTOYZGMJ.mjs → ios-Dvt97HgQ.mjs} +8 -8
  70. package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
  71. package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
  72. package/dist/{ios-device-DFGuwF4U.mjs → ios-device-CKSvk0bu.mjs} +3 -3
  73. package/dist/{ios-project-CSZYI1iu.mjs → ios-project-DCUDo06I.mjs} +5 -5
  74. package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
  75. package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-CT9nV5SP.mjs} +15 -7
  76. package/dist/{js-swap-BSBHldmm.mjs → js-swap-Z9HbC4cj.mjs} +7 -6
  77. package/dist/{launch-D-zq8SHG.mjs → launch-D0lPvFFu.mjs} +49 -30
  78. package/dist/{launch-CP2wDCVd.mjs → launch-DscF1QfM.mjs} +52 -50
  79. package/dist/{logs-pNvA2hHK.mjs → logs-BsIRre8x.mjs} +16 -9
  80. package/dist/{logs-By5aw3g9.mjs → logs-Crs9y34Z.mjs} +8 -6
  81. package/dist/{macos-CPMahOC2.mjs → macos-CcUlJPMu.mjs} +1 -1
  82. package/dist/{macos-C67FZ2ft.mjs → macos-D477nfzH.mjs} +49 -42
  83. package/dist/macos-run.mjs +1 -1
  84. package/dist/maintenance-run.mjs +7 -7
  85. package/dist/{metro-DiXtA3Ty.mjs → metro-1pJgCX4U.mjs} +4 -4
  86. package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-Bp9gJQAN.mjs} +3 -4
  87. package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BVbn8SvC.mjs} +3 -3
  88. package/dist/{native-android-_MWSs3PP.mjs → native-android-BvMizJn1.mjs} +17 -17
  89. package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BJscK4vN.mjs} +5 -5
  90. package/dist/{native-run-Dv88i0aU.mjs → native-run-D5OJsGwA.mjs} +6 -6
  91. package/dist/{native-runtime-DBRfY_PN.mjs → native-runtime-B9w_Qyz3.mjs} +10 -9
  92. package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
  93. package/dist/{native-xcode-inputs-CqViUh3r.mjs → native-xcode-inputs-Cv4l-obn.mjs} +2 -2
  94. package/dist/{native-xcode-ios-vFgqL_yS.mjs → native-xcode-ios-DGrg90hE.mjs} +21 -20
  95. package/dist/offload-worker.d.mts +12 -4
  96. package/dist/offload-worker.mjs +78 -43
  97. package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
  98. package/dist/{ownership-C5fo5Edb.mjs → ownership-jxxz-19m.mjs} +3 -3
  99. package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
  100. package/dist/phone-reverses-CYb7RRAx.mjs +57 -0
  101. package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DjOXJRIH.mjs} +1 -1
  102. package/dist/{plan-placement-cr0fEU7b.mjs → plan-placement-BqKgKHCi.mjs} +3 -3
  103. package/dist/{ports-DpXjKkSV.mjs → ports-DtS1Amb0.mjs} +3 -3
  104. package/dist/{prebuild-BligW0QS.mjs → prebuild-JUaqOLpc.mjs} +14 -9
  105. package/dist/{project-DhCtQWWU.mjs → project-BiC68mIp.mjs} +21 -17
  106. package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
  107. package/dist/pull-requests.mjs +1 -1
  108. package/dist/{react-native-android-ZlhQfhvq.mjs → react-native-android-DRYqoJc4.mjs} +76 -32
  109. package/dist/{react-native-build-CelbTO_y.mjs → react-native-build-CwZB-agu.mjs} +23 -20
  110. package/dist/{react-native-doctor-LTIaP7lv.mjs → react-native-doctor-BCrytK7h.mjs} +10 -9
  111. package/dist/{react-native-ios-C5W0SA6f.mjs → react-native-ios-Cr1buNFo.mjs} +41 -24
  112. package/dist/{recordings-CQmfzAh7.mjs → recordings-BaoQ0t-J.mjs} +1 -1
  113. package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
  114. package/dist/{reload-QcwnYLYV.mjs → reload-Beftw2X3.mjs} +1 -1
  115. package/dist/{reload-COJWTbae.mjs → reload-FbSgMF8x.mjs} +144 -42
  116. package/dist/{remote-DR8qUERM.mjs → remote-BuZj6AyU.mjs} +16 -7
  117. package/dist/{result-utnBea7x.mjs → result-CR2vk2cj.mjs} +41 -18
  118. package/dist/{run-DidHghD1.mjs → run-BtzE09Dl.mjs} +2 -2
  119. package/dist/{selection-DSMbWEX2.mjs → selection-D5cxEl3t.mjs} +13 -7
  120. package/dist/{server-bare-CafzuyFB.mjs → server-bare-CH9X0RLn.mjs} +56 -4
  121. package/dist/{server-command-B9o92sLM.mjs → server-command-CaBbDNU2.mjs} +5 -5
  122. package/dist/server-expo-C16Zf2k7.mjs +2 -0
  123. package/dist/{server-expo-BXrWxNYh.mjs → server-expo-Ck8EIidM.mjs} +14 -9
  124. package/dist/{settings-C7O8A6ZI.mjs → settings-B5tCoq9N.mjs} +132 -39
  125. package/dist/{settings-PfJx8uK1.mjs → settings-DzH9mGQZ.mjs} +1 -1
  126. package/dist/{settings-write-Chuy7Cte.mjs → settings-write-n0zwfohx.mjs} +7 -7
  127. package/dist/settings.schema.json +51 -0
  128. package/dist/{simslim-BNckWpXi.mjs → simslim-BjxszUAb.mjs} +22 -7
  129. package/dist/{slot-launch-B7AuoWJv.mjs → slot-launch-QeuJMlnJ.mjs} +6 -6
  130. package/dist/{stage-C4u17aES.mjs → stage-D8xlRU2D.mjs} +2 -3
  131. package/dist/{start-BL_BsiWt.mjs → start-C1JLjkNw.mjs} +1 -1
  132. package/dist/{start-CU8mCPC7.mjs → start-YMpNwLhh.mjs} +75 -35
  133. package/dist/{state--smjFSTL.mjs → state-DMRNP7-4.mjs} +4 -4
  134. package/dist/{state-08I3hw3_.mjs → state-DPaM3u5K.mjs} +2 -2
  135. package/dist/{stats-CO6sK0Nh.mjs → stats-CP7STzZw.mjs} +5 -5
  136. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  137. package/dist/{status-_WPHzVft.mjs → status-CRLiJ-O_.mjs} +24 -24
  138. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  139. package/dist/{status-CrJutl6-.mjs → status-cNw6i0_t.mjs} +1 -1
  140. package/dist/{status-watch-BHFasOZN.mjs → status-watch-Bc2J4TZn.mjs} +5 -5
  141. package/dist/status-worker.mjs +1 -1
  142. package/dist/stim-clonefile.c +18 -0
  143. package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
  144. package/dist/{stop-iuFHjUST.mjs → stop-Br7LKxBE.mjs} +2 -2
  145. package/dist/{stop-CR5689oB.mjs → stop-COP6PQqw.mjs} +5 -5
  146. package/dist/{stop-BJ06ipTZ.mjs → stop-Db9Kh-UA.mjs} +109 -56
  147. package/dist/supervisor-run.mjs +17 -17
  148. package/dist/{support-CbXPbUMJ.mjs → support-Cxj9CmII.mjs} +6 -6
  149. package/dist/{support-TWuQlHQo.mjs → support-qKcbgmI5.mjs} +14 -11
  150. package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-iY9fsmOc.mjs} +4 -4
  151. package/dist/{swiftpm-macos-DbwGCpZg.mjs → swiftpm-macos-Bp_sn9P4.mjs} +15 -14
  152. package/dist/{toolchain-XkA2PfJZ.mjs → toolchain-DB1aeqxO.mjs} +1 -1
  153. package/dist/{toolchain-B9hCFCQw.mjs → toolchain-VzLJzZ7O.mjs} +69 -37
  154. package/dist/trigger-BLsHgAGR.mjs +2 -0
  155. package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
  156. package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-BV3ZPmcY.mjs} +6 -6
  157. package/dist/{web-DRF_oFXk.mjs → web-B4Yjyt1G.mjs} +12 -10
  158. package/dist/web-DS4UDWvf.mjs +2 -0
  159. package/dist/web-run.mjs +8 -9
  160. package/dist/windows-report.mjs +12 -1
  161. package/dist/windows-report.ps1 +1 -1
  162. package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CPSp3mav.mjs} +11 -4
  163. package/dist/{workspaces-e41xsjKr.mjs → workspaces-C9w4aeXF.mjs} +36 -32
  164. package/dist/{worktree-B4Nj3EGS.mjs → worktree-CclFIe1Z.mjs} +324 -99
  165. package/dist/{worktree-BEwxVwKF.mjs → worktree-Ct9Gk3KL.mjs} +1 -1
  166. package/dist/{xcode-Rq744mBF.mjs → xcode-CiIIDnuD.mjs} +42 -28
  167. package/package.json +7 -7
  168. package/shim/bundle-response.cjs +53 -1
  169. package/shim/bundle-response.d.cts +1 -1
  170. package/shim/expo-metro-config.cjs +23 -1
  171. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
  172. package/dist/server-expo-Ddr8cG_c.mjs +0 -2
  173. package/dist/trigger-yb_nFzPF.mjs +0 -2
  174. package/dist/web-kDE9Myoy.mjs +0 -2
@@ -1,9 +1,9 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
2
- import { r as childEnvironment } from "./operation-exec-BW0em61G.mjs";
3
- import { n as buildCacheKey } from "./build-cache-Dv7RN200.mjs";
4
- import { o as androidHome } from "./android-C7sVmyI9.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
+ import { r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
3
+ import { o as androidHome } from "./android-Cjcj8MCw.mjs";
4
+ import { n as buildCacheKey } from "./build-cache-CKCzxzxA.mjs";
5
+ import { _ as nativeGradleLocalSourceDigest, h as gradleOffloadInputs } from "./client-BQsmyp_-.mjs";
5
6
  import { n as fingerprintNativeInputs } from "./native-inputs-TRTTTRxt.mjs";
6
- import { r as nativeGradleLocalSourceDigest, t as gradleOffloadInputs } from "./native-gradle-inputs-Dnh84Zbd.mjs";
7
7
  import { createHash } from "node:crypto";
8
8
  import { homedir } from "node:os";
9
9
  import { dirname, join, resolve } from "node:path";
@@ -1,7 +1,7 @@
1
- import { i as withWorkspaceProcessLock, l as refuseDeclaredSpawns, m as operationState, p as isTermination, s as allowDeclaredSpawns, u as signalDeclaredSpawns, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, b as operationState, g as signalDeclaredSpawns, h as refuseDeclaredSpawns, p as allowDeclaredSpawns, u as withWorkspaceProcessLock, y as isTermination } from "./exec-VFRpu1iA.mjs";
2
2
  import { d as workspaceDir } from "./paths-DQtTgsBf.mjs";
3
- import { a as formatElapsed, l as phaseLine } from "./command-output-YKGWivpG.mjs";
4
- import { o as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey } from "./workspace-state-U08dEzhG.mjs";
3
+ import { a as formatElapsed, l as phaseLine } from "./command-output-BBvS1H6v.mjs";
4
+ import { l as withWorkspaceStateLockAsync, o as updateWorkspaceState, r as readWorkspaceState, t as clearWorkspaceStateKey } from "./workspace-state-CPSp3mav.mjs";
5
5
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
6
6
  import { existsSync, mkdirSync } from "node:fs";
7
7
  import { basename, dirname, join } from "node:path";
@@ -226,12 +226,12 @@ function cancelOnAbort({ context, root, claim, write, controller }) {
226
226
  requestListeners.set(claim.claimId, onRequest);
227
227
  const watch = setInterval(onRequest, REQUEST_POLL_MS);
228
228
  watch.unref();
229
- return () => {
229
+ return async () => {
230
230
  clearInterval(watch);
231
231
  requestListeners.delete(claim.claimId);
232
232
  context.signal.removeEventListener("abort", onAbort);
233
233
  allowDeclaredSpawns(context);
234
- clearNativeRunCancel(root, claim.claimId);
234
+ await withWorkspaceStateLockAsync(root, () => clearNativeRunCancel(root, claim.claimId)).catch(() => {});
235
235
  };
236
236
  }
237
237
  /**
@@ -257,7 +257,7 @@ function withNativeBuildRun(context, root, details, fn, { write }) {
257
257
  try {
258
258
  return await fn(claim);
259
259
  } finally {
260
- dispose();
260
+ await dispose();
261
261
  state.runSignal = void 0;
262
262
  }
263
263
  }, {
@@ -1,14 +1,14 @@
1
- import { n as ensureWorkspaceStorage } from "./paths-DQtTgsBf.mjs";
2
- import { l as phaseLine } from "./command-output-YKGWivpG.mjs";
3
- import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
4
- import { j as metroPortSetting } from "./settings-C7O8A6ZI.mjs";
5
- import { d as resolveProjectMetro } from "./metro-DiXtA3Ty.mjs";
6
- import { Yt as LAUNCH_UNVERIFIED, qt as LAUNCH_BUNDLING } from "./budget-3ivAK99e.mjs";
7
- import { c as startDevServer } from "./start-CU8mCPC7.mjs";
1
+ import { r as ensureWorkspaceStorageAsync } from "./paths-DQtTgsBf.mjs";
2
+ import { l as phaseLine } from "./command-output-BBvS1H6v.mjs";
3
+ import { r as readWorkspaceState$1 } from "./workspace-state-CPSp3mav.mjs";
4
+ import { M as metroPortSetting } from "./settings-B5tCoq9N.mjs";
5
+ import { d as resolveProjectMetro } from "./metro-1pJgCX4U.mjs";
6
+ import { Yt as LAUNCH_BUNDLING, Zt as LAUNCH_UNVERIFIED } from "./budget-HyShrIpL.mjs";
7
+ import { c as startDevServer } from "./start-YMpNwLhh.mjs";
8
8
  import { readIdleStop } from "@stim-cli/core/state";
9
9
  import chalk from "chalk";
10
10
  //#region src/commands/native-runtime.ts
11
- async function ensureDevServer({ root, port, settings, settingsContext, remote, env, note, resolve = resolveProjectMetro, start = startDevServer, readState = readWorkspaceState$1 }) {
11
+ async function ensureDevServer({ root, port, settings, settingsContext, remote, hostedPorts, env, note, resolve = resolveProjectMetro, start = startDevServer, readState = readWorkspaceState$1 }) {
12
12
  const pin = metroPortSetting(settings, env);
13
13
  const canReuse = !pin.error && (pin.port === null || pin.port === port);
14
14
  const held = port === null || !canReuse ? null : (await resolve(port, root)).metro;
@@ -26,6 +26,7 @@ async function ensureDevServer({ root, port, settings, settingsContext, remote,
26
26
  settings,
27
27
  settingsContext,
28
28
  remote,
29
+ hostedPorts,
29
30
  out: note,
30
31
  note
31
32
  });
@@ -52,7 +53,7 @@ async function ensureDevServer({ root, port, settings, settingsContext, remote,
52
53
  }
53
54
  async function ensureWorkspaceStorageSafely(root, { note = (_line) => {} } = {}) {
54
55
  try {
55
- return ensureWorkspaceStorage(root);
56
+ return await ensureWorkspaceStorageAsync(root);
56
57
  } catch (err) {
57
58
  note(chalk.dim(`Could not prepare this workspace's Stim state: ${err?.message || err}`));
58
59
  throw err;
@@ -1,4 +1,4 @@
1
- import { s as gitAsync } from "./operation-exec-BW0em61G.mjs";
1
+ import { s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
2
2
  import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
3
3
  import { createHash } from "node:crypto";
4
4
  import { createReadStream } from "node:fs";
@@ -85,10 +85,13 @@ async function nativeFileDigest(path, signal) {
85
85
  sha256: hash.digest("hex")
86
86
  };
87
87
  }
88
- /** The exact source a build needs: tracked and untracked, not ignored, as `git ls-files -co --exclude-standard`. */
89
- async function sourceManifest(repoRoot, strict = false, signal) {
88
+ /**
89
+ * The exact source a build needs: tracked and untracked, not ignored, as `git ls-files -co --exclude-standard`, and
90
+ * the repository-relative `ignored` paths it also reads.
91
+ */
92
+ async function sourceManifest(repoRoot, strict = false, signal, ignored = []) {
90
93
  const files = [];
91
- for (const path of await gitVisiblePaths(repoRoot, signal)) {
94
+ for (const path of /* @__PURE__ */ new Set([...await gitVisiblePaths(repoRoot, signal), ...ignored])) {
92
95
  signal?.throwIfAborted();
93
96
  const absolute = join(repoRoot, path);
94
97
  let stat;
@@ -1,6 +1,6 @@
1
1
  import { d as workspaceDir, u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
2
- import { a as killOnAbort, l as gitQuietAsync, r as childEnvironment } from "./operation-exec-BW0em61G.mjs";
3
- import { h as pbxString, m as pbxReferences } from "./project-DhCtQWWU.mjs";
2
+ import { a as killOnAbort, l as gitQuietAsync, r as childEnvironment } from "./operation-exec-CUZifp6Z.mjs";
3
+ import { h as pbxString, m as pbxReferences } from "./project-BiC68mIp.mjs";
4
4
  import { n as fingerprintNativeInputs, t as NativeInputError } from "./native-inputs-TRTTTRxt.mjs";
5
5
  import { createHash } from "node:crypto";
6
6
  import { existsSync, readFileSync, realpathSync } from "node:fs";
@@ -1,22 +1,22 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { o as sharedCompilationCache } from "./paths-DQtTgsBf.mjs";
3
- import { G as resolveCacheProviderConfig, Nt as repoRootAsync, U as remoteIosSetting, et as settingShapeErrors } from "./settings-C7O8A6ZI.mjs";
4
- import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-DhCtQWWU.mjs";
5
- import { r as register } from "./cache-manifest-DSeQjt-Q.mjs";
6
- import { Fn as processContext, Y as statsProjectKey } from "./budget-3ivAK99e.mjs";
7
- import { d as runCancellationSignal } from "./native-run-Dv88i0aU.mjs";
8
- import { n as buildCacheKey, s as filesystemBuildCapability } from "./build-cache-Dv7RN200.mjs";
9
- import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-ccaPc4ox.mjs";
10
- import { a as buildXcode, l as parseSwiftVersion, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-Rq744mBF.mjs";
11
- import { a as nativeTransferRefusal } from "./client-B4MMzfo_.mjs";
12
- import { _ as runCaptured, a as iosToolchainAsync, h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-B9hCFCQw.mjs";
13
- import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-TWuQlHQo.mjs";
14
- import { r as gateProfileForDevice } from "./ios-signing-BtAffm0A.mjs";
15
- import { l as skippedMissReason, o as explainBuildMiss } from "./prebuild-BligW0QS.mjs";
16
- import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-BmbdHQbr.mjs";
17
- import { t as IosRecipeRefusal } from "./ios-project-CSZYI1iu.mjs";
18
- import { i as DEFAULT_DEPS, r as iosProcessRuntime } from "./launch-CP2wDCVd.mjs";
19
- import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-CqViUh3r.mjs";
3
+ import { K as resolveCacheProviderConfig, Pt as repoRootAsync, W as remoteIosSetting, tt as settingShapeErrors } from "./settings-B5tCoq9N.mjs";
4
+ import { g as selectNativeXcodeProject, h as pbxString, p as NativeXcodeError } from "./project-BiC68mIp.mjs";
5
+ import { r as register } from "./cache-manifest-BPXRONJz.mjs";
6
+ import { Rn as processContext, Z as statsProjectKey } from "./budget-HyShrIpL.mjs";
7
+ import { d as runCancellationSignal } from "./native-run-D5OJsGwA.mjs";
8
+ import { l as filesystemBuildCapability, n as buildCacheKey } from "./build-cache-CKCzxzxA.mjs";
9
+ import { l as artifactCachePolicy, p as resolveOptimizations } from "./errors-DHm_U5gv.mjs";
10
+ import { a as buildXcode, l as parseSwiftVersion, p as readBundleId, r as HEARTBEAT_INTERVAL_MS, s as compilationCacheSettings, u as parseXcodeMajor } from "./xcode-CiIIDnuD.mjs";
11
+ import { a as nativeTransferRefusal } from "./client-BQsmyp_-.mjs";
12
+ import { _ as runCaptured, a as iosToolchainAsync, h as readPodState, m as podsAreStale, v as runPodInstall } from "./toolchain-VzLJzZ7O.mjs";
13
+ import { a as deviceModelRefusal, h as resolveDeviceType, m as resolveConfiguration, v as resolveRuntime, x as simulatorBuildArch, y as resolveSchemeSelection } from "./support-qKcbgmI5.mjs";
14
+ import { r as gateProfileForDevice } from "./ios-signing-4c_qXvQm.mjs";
15
+ import { s as explainBuildMiss, u as skippedMissReason } from "./prebuild-JUaqOLpc.mjs";
16
+ import { n as planFlagRefusal, t as planCachedBuild } from "./build-plan-zCuHGlA8.mjs";
17
+ import { t as IosRecipeRefusal } from "./ios-project-DCUDo06I.mjs";
18
+ import { i as DEFAULT_DEPS, r as iosProcessRuntime } from "./launch-DscF1QfM.mjs";
19
+ import { a as nativeXcodeSources, i as nativeXcodePackages, n as nativeXcodeInputSnapshot, t as nativeXcodeHasPackages } from "./native-xcode-inputs-Cv4l-obn.mjs";
20
20
  import { existsSync } from "node:fs";
21
21
  import { join } from "node:path";
22
22
  //#region src/integrations/native-xcode-ios.ts
@@ -132,7 +132,8 @@ function nativeRecipe(root, context) {
132
132
  },
133
133
  cache: () => filesystemBuildCapability({
134
134
  context: context.operation,
135
- sources: snapshot ? nativeXcodeSources(snapshot) : null
135
+ sources: snapshot ? nativeXcodeSources(snapshot) : null,
136
+ readAppId: (path) => readBundleId(path)
136
137
  }),
137
138
  async prepare(beforePrepare) {
138
139
  const pods = readPodState(root, root);
@@ -322,7 +323,7 @@ function nativeRecipe(root, context) {
322
323
  platform: "ios",
323
324
  native: "xcode",
324
325
  local: {
325
- ...await iosToolchainAsync(root, "xcode"),
326
+ ...await iosToolchainAsync(root, null),
326
327
  ...context.target.hostedArchitecture ? { arch: context.target.hostedArchitecture === "x86_64" ? "x64" : "arm64" } : {}
327
328
  },
328
329
  runtime,
@@ -1,10 +1,12 @@
1
- import { c as IosToolchain, g as CompilationCacheActivity, h as CcacheActivity, i as AndroidBuildOptions, l as WorkerToolchain, p as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt } from "./android-project-DVWyCbWU.mjs";
1
+ import { c as IosToolchain, g as CompilationCacheActivity, h as CcacheActivity, i as AndroidBuildOptions, l as WorkerToolchain, p as Optimizations, r as SwiftpmArtifactToolchain, t as NativeGradleArtifactReceipt } from "./android-project-CTYaETc0.mjs";
2
2
  import { StimContext } from "@stim-cli/core";
3
- import { BuildReactNativeArtifactQuery, BuildStartParams, BuildSwiftpmArtifactQuery } from "@stim-cli/core/protocol";
3
+ import { BuildFingerprintSource, BuildReactNativeArtifactQuery, BuildStartParams, BuildSwiftpmArtifactQuery } from "@stim-cli/core/protocol";
4
4
  //#region src/offload/react-native-artifact.d.ts
5
5
  type ArtifactTools = (IosToolchain & {
6
6
  os: string;
7
- }) | Pick<WorkerToolchain, "stimBuild" | "os" | "arch" | "jdk" | "androidSdk">;
7
+ }) | (Pick<WorkerToolchain, "stimBuild" | "os" | "arch" | "jdk" | "androidSdk"> & {
8
+ compat: number;
9
+ });
8
10
  interface ArtifactReceipt {
9
11
  identity: {
10
12
  hash: string;
@@ -76,7 +78,6 @@ interface WorkerJob {
76
78
  } | null;
77
79
  swiftpmCache: string;
78
80
  project: string;
79
- packageName: string | null;
80
81
  isExpo: boolean;
81
82
  configuration: string | null;
82
83
  scheme: string | null;
@@ -84,8 +85,15 @@ interface WorkerJob {
84
85
  runtime: string | null;
85
86
  android: AndroidBuildOptions | null;
86
87
  expectedFingerprint: string | null;
88
+ /** The client's sources of `expectedFingerprint`, when its stim-server forwards them. */
89
+ expectedSources?: BuildFingerprintSource[];
90
+ /** The paths the client's git ignored for `expectedFingerprint`, which this checkout's git may not. */
91
+ expectedIgnored?: string[];
92
+ /** The top-level entries the client counted although an ignore pattern matches them; this checkout has no index. */
93
+ expectedTracked?: string[];
87
94
  cacheArtifact?: boolean;
88
95
  stimBuild?: string;
96
+ compat?: number;
89
97
  native?: BuildStartParams["native"];
90
98
  optimizations: Optimizations["ios"] | null;
91
99
  /** How long the client's Gradle daemon stays warm after an Android build; 0 or absent stops it when the build ends. */
@@ -1,35 +1,34 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { d as workspaceDir, m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
3
- import { k as writeConfigSetting } from "./config-DlrsduwG.mjs";
3
+ import { k as writeConfigSetting } from "./config-BZhXY15H.mjs";
4
4
  import { n as stripAnsi } from "./process-output-Fpl8PYi8.mjs";
5
- import { o as git, s as gitAsync } from "./operation-exec-BW0em61G.mjs";
6
- import { d as androidLayoutSetting, y as iosProjectDirSetting } from "./settings-C7O8A6ZI.mjs";
7
- import { f as projectRegistry, g as selectNativeXcodeProject } from "./project-DhCtQWWU.mjs";
5
+ import { o as git, s as gitAsync } from "./operation-exec-CUZifp6Z.mjs";
6
+ import { d as androidLayoutSetting, y as iosProjectDirSetting } from "./settings-B5tCoq9N.mjs";
7
+ import { f as projectRegistry, g as selectNativeXcodeProject } from "./project-BiC68mIp.mjs";
8
8
  import { o as parseNdjsonText } from "./ndjson-CgE_o3Dl.mjs";
9
- import { Fn as processContext } from "./budget-3ivAK99e.mjs";
10
- import { l as fingerprintProject, m as refingerprintAfterMutation } from "./build-cache-Dv7RN200.mjs";
11
- import { _ as withProjectNode, g as unmetNodePin, h as projectNodeLine, m as pathNodeVersion } from "./server-expo-BXrWxNYh.mjs";
12
- import { n as CCACHE_UNAVAILABLE, o as resolveCcache } from "./ccache-CH2EWGPB.mjs";
13
- import { _ as clearCorruptCompilationCache, f as reactNativeArtifactReceipt, g as COMPILATION_CACHE_CORRUPT, m as reactNativeBuildQuery, p as reactNativeArtifactToolchain } from "./client-B4MMzfo_.mjs";
14
- import { f as workerToolchain, h as readPodState, i as availableIphone, m as podsAreStale, v as runPodInstall } from "./toolchain-B9hCFCQw.mjs";
9
+ import { Rn as processContext } from "./budget-HyShrIpL.mjs";
10
+ import { d as fingerprintProject, i as compareSourceLists, v as refingerprintAfterMutation } from "./build-cache-CKCzxzxA.mjs";
11
+ import { _ as unmetNodePin, g as projectNodeLine, h as pathNodeVersion, v as withProjectNode } from "./server-expo-Ck8EIidM.mjs";
12
+ import { n as CCACHE_UNAVAILABLE, o as resolveCcache } from "./ccache-h1FKhZeg.mjs";
13
+ import { C as COMPILATION_CACHE_CORRUPT, b as validateGradleManifest, f as reactNativeArtifactReceipt, g as gradleStateDirectories, h as gradleOffloadInputs, m as reactNativeBuildQuery, p as reactNativeArtifactToolchain, v as nativeGradleOutputs, w as clearCorruptCompilationCache, x as verifyGradleTransfer } from "./client-BQsmyp_-.mjs";
14
+ import { f as workerToolchain, h as readPodState, i as availableIphone, m as podsAreStale, v as runPodInstall } from "./toolchain-VzLJzZ7O.mjs";
15
15
  import { n as fingerprintNativeInputs, r as manifestDigest } from "./native-inputs-TRTTTRxt.mjs";
16
- import { a as sourceManifest, o as verifyNativeTransfer } from "./native-source-Y0yLhFyQ.mjs";
17
- import { i as nativeGradleOutputs, n as gradleStateDirectories, o as validateGradleManifest, s as verifyGradleTransfer, t as gradleOffloadInputs } from "./native-gradle-inputs-Dnh84Zbd.mjs";
18
- import { n as buildAndroid, o as gradlewPath, r as buildIos, u as assembleTaskFor } from "./react-native-build-CelbTO_y.mjs";
19
- import { f as podAction } from "./support-TWuQlHQo.mjs";
20
- import { i as runPrebuild, r as recordPrebuild, t as planPrebuild } from "./prebuild-BligW0QS.mjs";
21
- import { g as dumpApkManifest, p as apkPackage } from "./support-CbXPbUMJ.mjs";
22
- import { n as buildAndroidOperation, t as buildIosOperation } from "./build-Dv9s8Fz-.mjs";
23
- import { i as stageBundle, n as resolveBundleExtras } from "./stage-C4u17aES.mjs";
24
- import { t as logLines } from "./run-DidHghD1.mjs";
25
- import { r as nativeXcodeMetadataDirectories } from "./native-xcode-inputs-CqViUh3r.mjs";
26
- import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-DFcGsXDP.mjs";
27
- import { a as nativeGradleWorkerArtifactIdentity, i as nativeGradleArtifactSnapshotFromReceipt, o as nativeGradleWorkerScope } from "./native-gradle-artifact-inputs-DHFnmrVf.mjs";
16
+ import { a as sourceManifest, o as verifyNativeTransfer } from "./native-source-D-4Dh4JU.mjs";
17
+ import { n as buildAndroid, o as gradlewPath, r as buildIos, u as assembleTaskFor } from "./react-native-build-CwZB-agu.mjs";
18
+ import { f as podAction } from "./support-qKcbgmI5.mjs";
19
+ import { a as runPrebuild, r as recordPrebuild, t as planPrebuild } from "./prebuild-JUaqOLpc.mjs";
20
+ import { g as dumpApkManifest, p as apkPackage } from "./support-Cxj9CmII.mjs";
21
+ import { n as buildAndroidOperation, t as buildIosOperation } from "./build-CAiw8Ezm.mjs";
22
+ import { i as stageBundle, n as resolveBundleExtras } from "./stage-D8xlRU2D.mjs";
23
+ import { t as logLines } from "./run-BtzE09Dl.mjs";
24
+ import { r as nativeXcodeMetadataDirectories } from "./native-xcode-inputs-Cv4l-obn.mjs";
25
+ import { n as swiftpmArtifactInputs, r as swiftpmArtifactSnapshot, t as readSwiftpmArtifactToolchain } from "./swiftpm-artifact-inputs-iY9fsmOc.mjs";
26
+ import { a as nativeGradleWorkerArtifactIdentity, i as nativeGradleArtifactSnapshotFromReceipt, o as nativeGradleWorkerScope } from "./native-gradle-artifact-inputs-BJscK4vN.mjs";
28
27
  import { createHash } from "node:crypto";
29
28
  import { chmodSync, constants, copyFileSync, cpSync, createReadStream, createWriteStream, existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, readlinkSync, realpathSync, renameSync, rmSync, statSync, symlinkSync, writeFileSync } from "node:fs";
30
29
  import { isDeepStrictEqual } from "node:util";
31
30
  import { basename, delimiter, dirname, join, relative, resolve, sep } from "node:path";
32
- import { dependencyInstall, withAmbientContext } from "@stim-cli/core";
31
+ import { dependencyInstall, reusableDependencies, withAmbientContext } from "@stim-cli/core";
33
32
  import { isJsonObject, windowsShortDir, windowsShortDirKey } from "@stim-cli/core/state";
34
33
  import { realpath } from "node:fs/promises";
35
34
  import { pipeline } from "node:stream/promises";
@@ -482,9 +481,35 @@ async function materialize(job, src) {
482
481
  renameSync(tmp, recordFile);
483
482
  return {
484
483
  written,
485
- removed
484
+ removed,
485
+ record: next
486
486
  };
487
487
  }
488
+ /** The synced files whose content no longer matches the manifest, such as a lockfile pod install rewrote. */
489
+ function rewrittenFiles(src, manifest, record) {
490
+ return manifest.flatMap((entry) => {
491
+ if (entry.kind === "directory") return [];
492
+ const target = join(src, entry.path);
493
+ const stat = lstatSync(target, { throwIfNoEntry: false });
494
+ const known = record[entry.path];
495
+ if (stat && known && stat.mtimeMs === known.mtimeMs && stat.size === known.size) return [];
496
+ if (!stat) return [entry.path];
497
+ const content = stat.isSymbolicLink() ? readlinkSync(target) : stat.isFile() ? readFileSync(target) : null;
498
+ return content !== null && createHash("sha256").update(content).digest("hex") === entry.sha256 ? [] : [entry.path];
499
+ });
500
+ }
501
+ function namedList(names) {
502
+ const shown = names.slice(0, 3).join(", ");
503
+ return names.length > 3 ? `${shown} and ${names.length - 3} more` : shown;
504
+ }
505
+ function fingerprintMismatch(job, there, sources, mutated) {
506
+ const differing = job.expectedSources ? compareSourceLists(job.expectedSources, [...sources]).map((change) => change.name) : [];
507
+ return [
508
+ `the checkout there fingerprints ${there.slice(0, 12)}, here ${job.expectedFingerprint?.slice(0, 12)}`,
509
+ ...mutated.files.length ? [`${mutated.steps.join(" and ")} there rewrote ${namedList(mutated.files)}`] : [],
510
+ ...differing.length ? [`differing sources: ${namedList(differing)}`] : []
511
+ ].join("; ");
512
+ }
488
513
  /**
489
514
  * Puts the Node that `root`, or the nearest directory above it in `src`, pins first on this worker's `PATH`, and
490
515
  * reports which Node the build runs on.
@@ -510,17 +535,15 @@ function useXcodeNode(iosDir) {
510
535
  }
511
536
  /** Installs JavaScript dependencies when the lockfile, or the install command, changed since the last install. */
512
537
  async function ensureDependencies(job, src) {
513
- const install = dependencyInstall(src, job.packageName, relative(src, realpathSync(join(src, job.project))));
538
+ const install = dependencyInstall(src, relative(src, realpathSync(join(src, job.project))));
514
539
  if (!install) return;
515
540
  const { command, args, digest, lockfile } = install;
516
- const marker = join(job.area, "dependencies");
541
+ const marker = join(job.area, install.marker);
517
542
  const installed = () => writeFileSync(join(job.area, "lockfile"), lockfile);
518
- if (existsSync(join(src, job.project, "node_modules")) && existsSync(marker)) {
519
- if (readFileSync(marker, "utf8") === digest) return installed();
520
- }
521
- note("deps", `${command} ${args.join(" ")}`);
543
+ if (reusableDependencies(job.area, job.project, lockfile)) return installed();
544
+ note("deps", `${command} ${args.join(" ")}${install.dir === "." ? "" : ` in ${install.dir}`}`);
522
545
  const child = getExecutor().spawn(command, args, {
523
- cwd: src,
546
+ cwd: join(src, install.dir),
524
547
  env: {
525
548
  ...process.env,
526
549
  CI: "1"
@@ -722,7 +745,9 @@ async function build(job) {
722
745
  const initial = await time("fingerprintMs", () => fingerprintProject(realRoot, {
723
746
  platform,
724
747
  iosProjectPath: iosProject.relative,
725
- androidLayout
748
+ androidLayout,
749
+ ignoredPaths: job.expectedIgnored,
750
+ trackedPaths: job.expectedTracked
726
751
  }));
727
752
  if (!initial) return failed("no-fingerprint", "The remote machine could not fingerprint the project.");
728
753
  const plan = planPrebuild(realRoot, platform, {
@@ -737,7 +762,7 @@ async function build(job) {
737
762
  recordPrebuild(realRoot, platform, null);
738
763
  const result = await time("prebuildMs", () => runPrebuild(realRoot, platform, log, { clean: plan === "regenerate" }));
739
764
  if (result?.failed) return nodeFailed("prebuild-failed", result.reason ?? "expo prebuild failed.");
740
- mutations.push("prebuild");
765
+ mutations.push("expo prebuild");
741
766
  }
742
767
  if (platform === "ios") {
743
768
  useXcodeNode(iosProject.dir);
@@ -750,24 +775,31 @@ async function build(job) {
750
775
  onHeartbeat: (line) => note("pods", line)
751
776
  }));
752
777
  if (result?.failed) return failed("pods-failed", result.reason ?? "pod install failed.");
753
- mutations.push("pods");
778
+ mutations.push("pod install");
754
779
  }
755
780
  }
756
781
  fingerprint = initial.hash;
782
+ let sources = initial.sources;
757
783
  if (mutations.length) {
758
784
  const after = await time("fingerprintMs", () => refingerprintAfterMutation({
759
785
  projectRoot: realRoot,
760
786
  platform,
761
787
  previousHash: initial.hash,
762
788
  iosProjectPath: iosProject.relative,
763
- androidLayout
789
+ androidLayout,
790
+ ignoredPaths: job.expectedIgnored,
791
+ trackedPaths: job.expectedTracked
764
792
  }));
765
793
  if (!after) return failed("no-fingerprint", `No fingerprint after ${mutations.join(", ")}.`);
766
794
  fingerprint = after.hash;
767
- if (mutations.includes("prebuild")) recordPrebuild(realRoot, platform, after.hash);
795
+ sources = after.sources;
796
+ if (mutations.includes("expo prebuild")) recordPrebuild(realRoot, platform, after.hash);
768
797
  }
769
- if (fingerprint !== job.expectedFingerprint) return failed("fingerprint-mismatch", `the checkout there fingerprints ${fingerprint.slice(0, 12)}, here ${job.expectedFingerprint?.slice(0, 12)}`);
770
- const tools = job.cacheArtifact ? await reactNativeArtifactToolchain(platform, realRoot) : null;
798
+ if (fingerprint !== job.expectedFingerprint) return failed("fingerprint-mismatch", fingerprintMismatch(job, fingerprint, sources, {
799
+ steps: mutations,
800
+ files: mutations.length ? rewrittenFiles(src, job.manifest, mirrored.record) : []
801
+ }));
802
+ const tools = job.cacheArtifact ? await reactNativeArtifactToolchain(platform, realRoot, iosProject.dir) : null;
771
803
  const query = tools ? reactNativeBuildQuery(job, fingerprint, job.project, tools) : null;
772
804
  const receipt = query ? reactNativeArtifactReceipt(query, tools) : null;
773
805
  compiled = platform === "android" ? await compileAndroid(job, realRoot, log, time, androidLayout) : await compileIos(job, realRoot, log, time);
@@ -778,10 +810,12 @@ async function build(job) {
778
810
  platform,
779
811
  previousHash: builtFingerprint,
780
812
  iosProjectPath: iosProject.relative,
781
- androidLayout
813
+ androidLayout,
814
+ ignoredPaths: job.expectedIgnored,
815
+ trackedPaths: job.expectedTracked
782
816
  }));
783
817
  if (!settled || settled.moved) return failed("fingerprint-moved", "The inputs changed during the build there.");
784
- const after = query && receipt ? reactNativeArtifactReceipt(query, await reactNativeArtifactToolchain(platform, realRoot)) : null;
818
+ const after = query && receipt ? reactNativeArtifactReceipt(query, await reactNativeArtifactToolchain(platform, realRoot, iosProject.dir)) : null;
785
819
  if (receipt && after && isDeepStrictEqual(receipt, after)) compiled.reactNativeArtifact = receipt;
786
820
  }
787
821
  try {
@@ -1086,10 +1120,11 @@ async function compileMacos(context, job, root, log, time) {
1086
1120
  };
1087
1121
  try {
1088
1122
  const extras = resolveBundleExtras(src, src, options.resources, options.assetCatalog);
1089
- const query = job.cacheArtifact && options.artifactInputs && job.expectedFingerprint && job.stimBuild ? {
1123
+ const stim = job.compat ? { compat: job.compat } : job.stimBuild ? { stimBuild: job.stimBuild } : null;
1124
+ const query = job.cacheArtifact && options.artifactInputs && job.expectedFingerprint && stim ? {
1090
1125
  project: job.project,
1091
1126
  sourceDigest: job.expectedFingerprint,
1092
- stimBuild: job.stimBuild,
1127
+ ...stim,
1093
1128
  inputs: options.artifactInputs,
1094
1129
  build: {
1095
1130
  product: options.product,
@@ -1,28 +1,5 @@
1
- import { m as operationState, r as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { b as operationState, c as throwIfCancelled, l as WorkspaceProcessCleanupError, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { sep } from "node:path";
3
- //#region src/cancellation.ts
4
- function cancelledError(what, cause) {
5
- return Object.assign(new Error(`The ${what} was cancelled.`, cause === void 0 ? void 0 : { cause }), { code: "STIM_CANCELLED" });
6
- }
7
- function throwIfCancelled(signal, what) {
8
- if (signal?.aborted) throw cancelledError(what);
9
- }
10
- function cancellableSleep(ms, { signal, what = "wait", ref = true } = {}) {
11
- return new Promise((resolve, reject) => {
12
- if (signal?.aborted) return reject(cancelledError(what));
13
- const onAbort = () => {
14
- clearTimeout(timer);
15
- reject(cancelledError(what));
16
- };
17
- const timer = setTimeout(() => {
18
- signal?.removeEventListener("abort", onAbort);
19
- resolve();
20
- }, ms);
21
- if (!ref) timer.unref();
22
- signal?.addEventListener("abort", onAbort, { once: true });
23
- });
24
- }
25
- //#endregion
26
3
  //#region src/workspace/git.ts
27
4
  const GIT_TIMEOUT_MS = 1e4;
28
5
  const GIT_CONCURRENCY = 6;
@@ -168,4 +145,4 @@ async function runOperationFileQuiet(context, executor, file, args, options) {
168
145
  }
169
146
  }
170
147
  //#endregion
171
- export { killOnAbort as a, gitQuiet as c, cancelledError as d, throwIfCancelled as f, gitPath as i, gitQuietAsync as l, runOperationFileQuiet as n, git as o, childEnvironment as r, gitAsync as s, runOperationFile as t, cancellableSleep as u };
148
+ export { killOnAbort as a, gitQuiet as c, gitPath as i, gitQuietAsync as l, runOperationFileQuiet as n, git as o, childEnvironment as r, gitAsync as s, runOperationFile as t };
@@ -1,6 +1,6 @@
1
- import { g as process_identity_exports } from "./exec-DEoAhcze.mjs";
2
- import { c as withWorkspaceStateLock, d as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-U08dEzhG.mjs";
3
- import { c as pidExists } from "./metro-DiXtA3Ty.mjs";
1
+ import { S as process_identity_exports } from "./exec-VFRpu1iA.mjs";
2
+ import { c as withWorkspaceStateLock, d as writeWorkspaceState, r as readWorkspaceState } from "./workspace-state-CPSp3mav.mjs";
3
+ import { c as pidExists } from "./metro-1pJgCX4U.mjs";
4
4
  import { realpathSync } from "node:fs";
5
5
  //#region src/collector/state.ts
6
6
  function collectorRoot(root) {
@@ -1,6 +1,5 @@
1
- import { g as process_identity_exports } from "./exec-DEoAhcze.mjs";
2
- import { f as throwIfCancelled } from "./operation-exec-BW0em61G.mjs";
3
- import { t as connectOwnedBrowser } from "./cdp-3fwICjzi.mjs";
1
+ import { S as process_identity_exports, c as throwIfCancelled } from "./exec-VFRpu1iA.mjs";
2
+ import { t as connectOwnedBrowser } from "./cdp-BG3FJCCx.mjs";
4
3
  //#region src/web/page.ts
5
4
  /** The record of a verified live browser: its supervisor and Chrome are the processes the record names. */
6
5
  function liveWebRecord(record) {
@@ -0,0 +1,57 @@
1
+ import { U as parseDeviceSlotKey, V as deviceSlotKey } from "./config-BZhXY15H.mjs";
2
+ import { r as readWorkspaceState$1, s as updateWorkspaceStateAsync } from "./workspace-state-CPSp3mav.mjs";
3
+ import { $ as removeMetroReverses } from "./android-Cjcj8MCw.mjs";
4
+ import { isJsonObject } from "@stim-cli/core/state";
5
+ //#region src/devices/phone-reverses.ts
6
+ const KEY = "phoneReverses";
7
+ function readRecords(state) {
8
+ const raw = state?.[KEY];
9
+ const records = {};
10
+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) return records;
11
+ for (const [key, value] of Object.entries(raw)) {
12
+ if (!isJsonObject(value)) continue;
13
+ const entry = value;
14
+ if (typeof entry.serial !== "string" || !Array.isArray(entry.ports) || !parseDeviceSlotKey(key)) continue;
15
+ records[key] = {
16
+ serial: entry.serial,
17
+ ports: entry.ports.filter((port) => Number.isSafeInteger(port) && port > 0)
18
+ };
19
+ }
20
+ return records;
21
+ }
22
+ async function recordPhoneReverse(root, slot, serial, port) {
23
+ const key = deviceSlotKey("android", slot);
24
+ await updateWorkspaceStateAsync(root, (state) => {
25
+ const records = readRecords(state);
26
+ const previous = records[key]?.serial === serial ? records[key].ports : [];
27
+ records[key] = {
28
+ serial,
29
+ ports: [.../* @__PURE__ */ new Set([...previous, port])]
30
+ };
31
+ return {
32
+ ...state,
33
+ [KEY]: records
34
+ };
35
+ });
36
+ }
37
+ async function removePhoneReverses(root, { slot, operation } = {}) {
38
+ const records = Object.entries(readRecords(readWorkspaceState$1(root))).filter(([key]) => slot === void 0 || parseDeviceSlotKey(key)?.slot === slot);
39
+ for (const [, { serial, ports }] of records) await removeMetroReverses(serial, ports, operation);
40
+ if (records.length === 0) return;
41
+ await updateWorkspaceStateAsync(root, (state) => {
42
+ const remaining = readRecords(state);
43
+ for (const [key, done] of records) {
44
+ const current = remaining[key];
45
+ if (current?.serial !== done.serial) continue;
46
+ current.ports = current.ports.filter((port) => !done.ports.includes(port));
47
+ if (current.ports.length === 0) delete remaining[key];
48
+ }
49
+ const { [KEY]: _, ...rest } = state;
50
+ return Object.keys(remaining).length ? {
51
+ ...rest,
52
+ [KEY]: remaining
53
+ } : rest;
54
+ });
55
+ }
56
+ //#endregion
57
+ export { removePhoneReverses as n, recordPhoneReverse as t };
@@ -1,4 +1,4 @@
1
- import { n as buildPlacementSettings } from "./selection-DSMbWEX2.mjs";
1
+ import { n as buildPlacementSettings } from "./selection-D5cxEl3t.mjs";
2
2
  //#region src/placement-log.ts
3
3
  /** `machine` is `local` when the run stays on this machine. */
4
4
  function placementRecord(input) {
@@ -1,6 +1,6 @@
1
- import { d as hostingMachines } from "./selection-DSMbWEX2.mjs";
2
- import { r as readHostedNative } from "./ios-state-Dtw5K2aI.mjs";
3
- import { i as probeHost, n as automaticDevicePlacement } from "./eas-fallback-vKlrqxgE.mjs";
1
+ import { f as hostingMachines } from "./selection-D5cxEl3t.mjs";
2
+ import { r as readHostedNative } from "./ios-state-CT9nV5SP.mjs";
3
+ import { i as probeHost, n as automaticDevicePlacement } from "./eas-fallback-gaZi-dJL.mjs";
4
4
  import { automaticMachineEnabled } from "@stim-cli/core/state";
5
5
  //#region src/device-host/plan-placement.ts
6
6
  /**
@@ -1,6 +1,6 @@
1
- import { p as getProject } from "./config-DlrsduwG.mjs";
2
- import { n as findCommandWorkspace } from "./project-DhCtQWWU.mjs";
3
- import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-DkEzOfzO.mjs";
1
+ import { p as getProject } from "./config-BZhXY15H.mjs";
2
+ import { n as findCommandWorkspace } from "./project-BiC68mIp.mjs";
3
+ import { n as getNamedPort, t as clearNamedPorts } from "./named-ports-BVbn8SvC.mjs";
4
4
  //#region src/commands/ports.ts
5
5
  async function inProject(action) {
6
6
  try {