stim 1.23.0 → 1.24.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 (169) hide show
  1. package/README.md +3 -2
  2. package/dist/{acquire-artifact-ybouwJSR.mjs → acquire-artifact-CEs02U2o.mjs} +2 -2
  3. package/dist/{act-DG54PWtJ.mjs → act-Cyvm8xYc.mjs} +40 -25
  4. package/dist/{activity-B5RtpFda.mjs → activity-Dq3ZcdD8.mjs} +6 -6
  5. package/dist/{agent-device-usage-output-UJ5gC80l.mjs → agent-device-usage-output-CccomeE0.mjs} +5 -5
  6. package/dist/{android-C7sVmyI9.mjs → android-882m4hxX.mjs} +140 -46
  7. package/dist/{android-BoUJKbfz.mjs → android-BZppyPe_.mjs} +66 -46
  8. package/dist/{android-DR5lZ2Az.mjs → android-CX5IcRuf.mjs} +13 -3
  9. package/dist/{android-CHH4KLOR.mjs → android-DcztblCT.mjs} +5 -5
  10. package/dist/{android-cas-ngferVq2.mjs → android-cas-BtCOrNqb.mjs} +3 -3
  11. package/dist/android-cas-compiler.mjs +1 -1
  12. package/dist/api.d.mts +22 -4
  13. package/dist/api.mjs +32 -31
  14. package/dist/{artifact-5RteZem7.mjs → artifact-BR5VNArK.mjs} +17 -16
  15. package/dist/{artifact-Dwdo7k1E.mjs → artifact-Bdt_n9Jc.mjs} +17 -16
  16. package/dist/{artifact-platform-CXcmX_j3.mjs → artifact-platform-CMRc0M_r.mjs} +3 -3
  17. package/dist/{browser-web-CeEVlGug.mjs → browser-web-ycg9qWB8.mjs} +16 -17
  18. package/dist/{budget-DnPX3DXj.mjs → budget-dPGuhNai.mjs} +101 -40
  19. package/dist/{build-CqufZFqy.mjs → build-CaF574eS.mjs} +31 -28
  20. package/dist/{build-cache-Dv7RN200.mjs → build-cache-HFUQ9eLz.mjs} +152 -19
  21. package/dist/{build-plan-C8CIvRyi.mjs → build-plan-JsDUq4w1.mjs} +8 -7
  22. package/dist/{cache-manifest-DSeQjt-Q.mjs → cache-manifest-BPXRONJz.mjs} +1 -1
  23. package/dist/cache-manifest.mjs +1 -1
  24. package/dist/{ccache-RcAy92gH.mjs → ccache-CCn1S6qG.mjs} +6 -6
  25. package/dist/{cdp-3fwICjzi.mjs → cdp-BG3FJCCx.mjs} +1 -1
  26. package/dist/{chrome-Bbw689-6.mjs → chrome-BvV8ssI3.mjs} +1 -1
  27. package/dist/{cli-D-J9fWGV.mjs → cli-xqAidP7O.mjs} +20 -20
  28. package/dist/cli.mjs +1 -1
  29. package/dist/{client-yyso1bwi.mjs → client-18-ZowoT.mjs} +254 -28
  30. package/dist/collector-run.mjs +6 -6
  31. package/dist/{command-output-Db8BqzxH.mjs → command-output-DxC0k2rk.mjs} +3 -2
  32. package/dist/{config-DlrsduwG.mjs → config-BZhXY15H.mjs} +3 -3
  33. package/dist/{created-devices-x9rN6bhs.mjs → created-devices-D2Aca-xu.mjs} +6 -2
  34. package/dist/{dependency-state-1I9KZT1Y.mjs → dependency-state-C56ll9hY.mjs} +2 -2
  35. package/dist/{detached-entry-BwNEtIrP.mjs → detached-entry-KmieOKgN.mjs} +1 -1
  36. package/dist/{dev-client-BnYSDiKa.mjs → dev-client-w_fok0Ek.mjs} +3 -3
  37. package/dist/{device-BvzPUBs3.mjs → device-4RUugw5X.mjs} +16 -16
  38. package/dist/{device-CCkWmkAA.mjs → device-BktRGdjS.mjs} +40 -44
  39. package/dist/{device-capacity-CjaSdrhg.mjs → device-capacity-Ic-kdmEV.mjs} +20 -16
  40. package/dist/device-host-worker.mjs +17 -17
  41. package/dist/{device-ios-uOiEETX2.mjs → device-ios-DzpSlZyd.mjs} +23 -24
  42. package/dist/{device-lease-run-BgwPHc6u.mjs → device-lease-run-DUtkbqBQ.mjs} +5 -5
  43. package/dist/{device-pool-C-ptmZTa.mjs → device-pool-CgBHk401.mjs} +3 -3
  44. package/dist/{doctor-pxxvipYC.mjs → doctor-BZ6oxNum.mjs} +1 -1
  45. package/dist/{doctor-8sr2tFOL.mjs → doctor-C33AzVfR.mjs} +28 -28
  46. package/dist/{doctor-D2SN3Ltx.mjs → doctor-DZgpqR6J.mjs} +17 -16
  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-watchman-sy_RNhFt.mjs → doctor-watchman-B453A231.mjs} +5 -5
  50. package/dist/{eas-build-CyjU5K7E.mjs → eas-build-CxKUNHsb.mjs} +4 -4
  51. package/dist/{eas-fallback-DV3Wytf1.mjs → eas-fallback-LMxk9Kw0.mjs} +14 -14
  52. package/dist/{eas-session-ledger-BzzsX97d.mjs → eas-session-ledger-Ck6YXPAO.mjs} +12 -8
  53. package/dist/{error-diagnostics-C6sVoeqO.mjs → error-diagnostics-BkKCZq4P.mjs} +17 -42
  54. package/dist/{exec-DEoAhcze.mjs → exec-VFRpu1iA.mjs} +116 -28
  55. package/dist/{gc-DLbzvTP2.mjs → gc-DDWEAj0w.mjs} +2 -2
  56. package/dist/{gc-CDoogxAI.mjs → gc-yVKpAOKM.mjs} +205 -28
  57. package/dist/{guide-BC37GcDG.mjs → guide-Bggftwc5.mjs} +252 -73
  58. package/dist/{hosted-android-CkclQig_.mjs → hosted-android-D4dweBof.mjs} +4 -4
  59. package/dist/{hosted-client-ByuMMO5s.mjs → hosted-client-BBTVe3X6.mjs} +4 -4
  60. package/dist/{hosted-ios-DtYHeuYR.mjs → hosted-ios-Sn0djzg8.mjs} +1 -1
  61. package/dist/{hosted-logs-Br84qWy1.mjs → hosted-logs-CYIZ5ubJ.mjs} +11 -6
  62. package/dist/{hosted-macos-DdtYajZt.mjs → hosted-macos-CXjsUNBR.mjs} +7 -7
  63. package/dist/{hosted-native-UPI9zdZ4.mjs → hosted-native-Doxbfzem.mjs} +58 -11
  64. package/dist/{idle-shutdown-DO7oIRlc.mjs → idle-shutdown-BInjLKqm.mjs} +10 -10
  65. package/dist/{ios-DZZbNYlY.mjs → ios-B1FXRCMX.mjs} +71 -44
  66. package/dist/{ios-vbUOqGXu.mjs → ios-BItP6lkn.mjs} +8 -8
  67. package/dist/{ios-hcBpnEGk.mjs → ios-CVUFFZ6C.mjs} +70 -13
  68. package/dist/{ios-xtlRHaeB.mjs → ios-ENC4sRPA.mjs} +1 -1
  69. package/dist/{ios-device-BXZ0c7Kb.mjs → ios-device-B6HK951C.mjs} +1 -1
  70. package/dist/{ios-device-JC3uWM4K.mjs → ios-device-BI38NFFH.mjs} +3 -3
  71. package/dist/{ios-project-CVyNwjAF.mjs → ios-project-KYqeJURj.mjs} +5 -5
  72. package/dist/{ios-signing-BtAffm0A.mjs → ios-signing-4c_qXvQm.mjs} +2 -2
  73. package/dist/{ios-state-Dtw5K2aI.mjs → ios-state-DlElquYD.mjs} +15 -7
  74. package/dist/{js-swap-C3QxUFJR.mjs → js-swap-BvrQvXHY.mjs} +7 -6
  75. package/dist/{launch-CHY3p-yz.mjs → launch-BVlyQw3T.mjs} +51 -49
  76. package/dist/{launch-Bz7JtaC4.mjs → launch-SfzGH_s9.mjs} +48 -29
  77. package/dist/{logs-mxqsWpJs.mjs → logs-DXE32kyb.mjs} +16 -9
  78. package/dist/{logs-CtNeNDuq.mjs → logs-ovlU7m7N.mjs} +8 -6
  79. package/dist/{macos-inNFbBWc.mjs → macos-B3BveDrU.mjs} +1 -1
  80. package/dist/{macos-u0BoHKnO.mjs → macos-CCfhb-jT.mjs} +49 -42
  81. package/dist/macos-run.mjs +1 -1
  82. package/dist/maintenance-run.mjs +7 -7
  83. package/dist/{metro-DiXtA3Ty.mjs → metro-Bu8LBfzS.mjs} +4 -4
  84. package/dist/{metro-gateway-CKZqKqx7.mjs → metro-gateway-DtsOy-0P.mjs} +3 -4
  85. package/dist/{named-ports-DkEzOfzO.mjs → named-ports-BWDuU5oQ.mjs} +3 -3
  86. package/dist/{native-android-CdCSylTn.mjs → native-android-96BBizbq.mjs} +17 -17
  87. package/dist/{native-gradle-artifact-inputs-DHFnmrVf.mjs → native-gradle-artifact-inputs-BcLYBZil.mjs} +5 -5
  88. package/dist/{native-run-BUTu8T7A.mjs → native-run-BmH7U8pr.mjs} +6 -6
  89. package/dist/{native-runtime-CRSOZxKY.mjs → native-runtime-DgtJkzIa.mjs} +10 -9
  90. package/dist/{native-source-Y0yLhFyQ.mjs → native-source-D-4Dh4JU.mjs} +7 -4
  91. package/dist/{native-xcode-inputs-G6rkkhxu.mjs → native-xcode-inputs-irplbQb0.mjs} +2 -2
  92. package/dist/{native-xcode-ios-_os2PlCD.mjs → native-xcode-ios-BY-6hh6M.mjs} +18 -18
  93. package/dist/offload-worker.d.mts +7 -2
  94. package/dist/offload-worker.mjs +104 -43
  95. package/dist/{operation-exec-BW0em61G.mjs → operation-exec-CUZifp6Z.mjs} +2 -25
  96. package/dist/{ownership-C5fo5Edb.mjs → ownership-DxlZGDcV.mjs} +3 -3
  97. package/dist/{page-DBL2PiUU.mjs → page-CzEA_-5_.mjs} +2 -3
  98. package/dist/phone-reverses-BdsdesVF.mjs +57 -0
  99. package/dist/{placement-log-BnGgJRRZ.mjs → placement-log-DUvqqsB-.mjs} +1 -1
  100. package/dist/{plan-placement-BU42oOyT.mjs → plan-placement-4axc0Hs7.mjs} +3 -3
  101. package/dist/{ports-BSmQKzW7.mjs → ports-D-E_OiAO.mjs} +3 -3
  102. package/dist/{prebuild-BFm63bQ0.mjs → prebuild-DmVCf5xb.mjs} +14 -9
  103. package/dist/{project-CTLNHCfE.mjs → project-Dz-hWkb-.mjs} +21 -17
  104. package/dist/{pull-request-W1IuLXDt.mjs → pull-request-CbNlkFok.mjs} +2 -2
  105. package/dist/pull-requests.mjs +1 -1
  106. package/dist/{react-native-android-CFgUroxW.mjs → react-native-android-DOinxgwB.mjs} +75 -32
  107. package/dist/{react-native-build-CmJkTljQ.mjs → react-native-build-AuCu-aAP.mjs} +22 -19
  108. package/dist/{react-native-doctor-LTF-Xt8l.mjs → react-native-doctor-2ivJUmwZ.mjs} +10 -9
  109. package/dist/{react-native-ios-ChBF1MkB.mjs → react-native-ios-D5zTIuH8.mjs} +38 -22
  110. package/dist/{recordings-CQmfzAh7.mjs → recordings-CdPwYwvs.mjs} +1 -1
  111. package/dist/{registration-BcRgF6Ox.mjs → registration-CN6nlhcD.mjs} +1 -1
  112. package/dist/{reload-DF9hqUUB.mjs → reload-C1TTVesC.mjs} +144 -42
  113. package/dist/{reload-RBi1nj6Z.mjs → reload-Ck9RJeSq.mjs} +1 -1
  114. package/dist/{remote-BmvMCcJw.mjs → remote-DEZ7AOVq.mjs} +7 -7
  115. package/dist/{result-Cx5CRLvS.mjs → result-DqBrb12U.mjs} +40 -17
  116. package/dist/{run-DidHghD1.mjs → run-BIwoU44q.mjs} +2 -2
  117. package/dist/{selection-DSMbWEX2.mjs → selection-BLtvaqxc.mjs} +11 -5
  118. package/dist/{server-bare-CafzuyFB.mjs → server-bare-Z1ToVLPn.mjs} +2 -2
  119. package/dist/{server-command-BTiGPEjS.mjs → server-command-C0pmjNdG.mjs} +6 -6
  120. package/dist/server-expo-CEntXzRw.mjs +2 -0
  121. package/dist/{server-expo-D9lEz4aq.mjs → server-expo-Tt_hLRpy.mjs} +37 -13
  122. package/dist/{settings-C7O8A6ZI.mjs → settings-RKwY33wv.mjs} +114 -19
  123. package/dist/{settings-eKF_vJJs.mjs → settings-kkt0vP4w.mjs} +1 -1
  124. package/dist/{settings-write-79mQRr9C.mjs → settings-write--gj6MACV.mjs} +7 -7
  125. package/dist/settings.schema.json +13 -0
  126. package/dist/{simslim-BNckWpXi.mjs → simslim-CdWKT3vA.mjs} +2 -2
  127. package/dist/{slot-launch-D7M2nE4b.mjs → slot-launch-A1BgotaM.mjs} +6 -6
  128. package/dist/{stage-DKNM4ZPd.mjs → stage-ERTMh88n.mjs} +2 -3
  129. package/dist/{start-bjfiScgz.mjs → start-BKGrEhzG.mjs} +75 -35
  130. package/dist/{start-CRfN1kWV.mjs → start-Bmg_qmHi.mjs} +1 -1
  131. package/dist/{state--smjFSTL.mjs → state-B1ig0Kqy.mjs} +4 -4
  132. package/dist/{state-08I3hw3_.mjs → state-BfAltYJP.mjs} +2 -2
  133. package/dist/{stats-DioA6cBU.mjs → stats-B-ckuiUg.mjs} +5 -5
  134. package/dist/{stats-report-BzaPrRm6.mjs → stats-report-n2U5plhk.mjs} +1 -1
  135. package/dist/{status-kzbeWk4x.mjs → status-DfFp6a76.mjs} +24 -24
  136. package/dist/{status-BRROykC8.mjs → status-Fect2w9R.mjs} +1 -1
  137. package/dist/{status-Eqx_20WC.mjs → status-Pw-807f0.mjs} +1 -1
  138. package/dist/{status-watch-BIqqbJ6q.mjs → status-watch-XC7F-AMf.mjs} +5 -5
  139. package/dist/status-worker.mjs +1 -1
  140. package/dist/stim-clonefile.c +18 -0
  141. package/dist/{stim-desktop-D5OGpYZM.mjs → stim-desktop-DS0mzR8U.mjs} +2 -2
  142. package/dist/{stop-B18d8KDw.mjs → stop-BFu7X_Do.mjs} +2 -2
  143. package/dist/{stop-B2uLQfoM.mjs → stop-CL1kDHds.mjs} +55 -21
  144. package/dist/{stop-DzLJc7Ei.mjs → stop-DhclRwOO.mjs} +5 -5
  145. package/dist/supervisor-run.mjs +16 -16
  146. package/dist/{support-BTpZ6RAJ.mjs → support-B1W-hmC2.mjs} +8 -8
  147. package/dist/{support-DTBV56gy.mjs → support-B3tzVhKn.mjs} +6 -6
  148. package/dist/{swiftpm-artifact-inputs-DFcGsXDP.mjs → swiftpm-artifact-inputs-BWYPj9Sn.mjs} +4 -4
  149. package/dist/{swiftpm-macos-r_WSKlXr.mjs → swiftpm-macos-BVCP5mO4.mjs} +14 -13
  150. package/dist/{toolchain-GVgnf8d1.mjs → toolchain-BjgKdoEf.mjs} +1 -1
  151. package/dist/{toolchain-CWeGJgCc.mjs → toolchain-D3bmRMia.mjs} +57 -36
  152. package/dist/trigger-BLsHgAGR.mjs +2 -0
  153. package/dist/{trigger-Cbyc41d_.mjs → trigger-CBMe2YLH.mjs} +2 -2
  154. package/dist/{warm-progress-CA3TgT3-.mjs → warm-progress-ol0ZypEu.mjs} +6 -6
  155. package/dist/{web-CwREhjD-.mjs → web-BH7peScT.mjs} +12 -10
  156. package/dist/web-BdOFlTJr.mjs +2 -0
  157. package/dist/web-run.mjs +8 -9
  158. package/dist/windows-report.mjs +12 -1
  159. package/dist/windows-report.ps1 +1 -1
  160. package/dist/{workspace-state-U08dEzhG.mjs → workspace-state-CeBpIZgr.mjs} +11 -4
  161. package/dist/{workspaces-BxzYlo3P.mjs → workspaces-CSV2Orf4.mjs} +36 -32
  162. package/dist/{worktree-BxfVxG_b.mjs → worktree-DEDUzO_L.mjs} +1 -1
  163. package/dist/{worktree-8lqn_lBp.mjs → worktree-Dw8kfacb.mjs} +324 -99
  164. package/dist/{xcode-iQnROM5o.mjs → xcode-DHu41qQ4.mjs} +41 -27
  165. package/package.json +7 -7
  166. package/dist/native-gradle-inputs-Dnh84Zbd.mjs +0 -211
  167. package/dist/server-expo-C-Buqvn_.mjs +0 -2
  168. package/dist/trigger-yb_nFzPF.mjs +0 -2
  169. package/dist/web-Cduk0NSE.mjs +0 -2
@@ -1,16 +1,16 @@
1
- import { t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
2
- import { D as withConfigLock, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync, _ as loadConfig, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as acquireAvdClaim, t as allConsolePortsAndSerials, w as setDevice } from "./config-DlrsduwG.mjs";
3
- import { l as phaseLine } from "./command-output-Db8BqzxH.mjs";
4
- import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-C7O8A6ZI.mjs";
5
- import { s as ownedDeviceLabel } from "./project-CTLNHCfE.mjs";
6
- import { c as pidExists } from "./metro-DiXtA3Ty.mjs";
7
- import { A as teardownParkedAvd, D as teardownOwnedAvd } from "./workspaces-BxzYlo3P.mjs";
8
- import { A as listAdbDevices, B as ownedAvdDeviceProfile, F as listAvdsAsync, H as ownedAvdMatchesConfiguration, I as listInstalledSystemImages, K as ownedAvdSystemImage, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, _ as avdPoolConfiguration, _t as parkedMaxSetting, b as configureNewOwnedAvd, et as resolveOwnedAvdSerialAsync, f as assertOwnedAvdStopped, ft as adoptParked, ht as isLegacyDeletionClaim, j as listAdbDevicesAsync, n as OWNED_AVD_CONFIG_DEFAULTS, ot as waitForBoot, t as DEFAULT_AVD_DEVICE_PROFILE, vt as readParked, x as createOwnedAvd, y as bootAndroidEmulator, z as nextConsolePort } from "./android-C7sVmyI9.mjs";
9
- import { I as memoryCulpritAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, d as listAllIosSims } from "./ios-hcBpnEGk.mjs";
10
- import { t as clearDeviceIdleShutdown } from "./idle-shutdown-DO7oIRlc.mjs";
11
- import { i as countLiveOwnedDevices, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-CjaSdrhg.mjs";
12
- import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-uOiEETX2.mjs";
13
- import { t as reconcileSimSlim } from "./simslim-BNckWpXi.mjs";
1
+ import { D as ownership_claim_exports, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
+ import { D as withConfigLock, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync, _ as loadConfig, a as clearDevice, b as releaseAndroidConsolePort, i as clearAndroidBootPending, j as acquireAvdClaim, t as allConsolePortsAndSerials, w as setDevice } from "./config-BZhXY15H.mjs";
3
+ import { l as phaseLine } from "./command-output-DxC0k2rk.mjs";
4
+ import { l as androidDataPartitionSizeGbSetting, o as androidAvdConfigSetting } from "./settings-RKwY33wv.mjs";
5
+ import { s as ownedDeviceLabel } from "./project-Dz-hWkb-.mjs";
6
+ import { A as listAdbDevices, B as ownedAvdDeviceProfile, F as listAvdsAsync, H as ownedAvdMatchesConfiguration, I as listInstalledSystemImages, K as ownedAvdSystemImage, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, _ as avdPoolConfiguration, b as configureNewOwnedAvd, ct as waitForBoot, f as assertOwnedAvdStopped, gt as isLegacyDeletionClaim, j as listAdbDevicesAsync, n as OWNED_AVD_CONFIG_DEFAULTS, nt as resolveOwnedAvdSerialAsync, pt as adoptParked, t as DEFAULT_AVD_DEVICE_PROFILE, vt as parkedMaxSetting, x as createOwnedAvd, y as bootAndroidEmulator, yt as readParked, z as nextConsolePort } from "./android-882m4hxX.mjs";
7
+ import { c as pidExists } from "./metro-Bu8LBfzS.mjs";
8
+ import { O as teardownOwnedAvd, j as teardownParkedAvd } from "./workspaces-CSV2Orf4.mjs";
9
+ import { F as readHostMemoryPressure, L as reportMemoryCulprits, P as memoryCulpritsUnderAsync, R as memoryCulpritAdvice, d as listAllIosSims } from "./ios-CVUFFZ6C.mjs";
10
+ import { t as clearDeviceIdleShutdown } from "./idle-shutdown-BInjLKqm.mjs";
11
+ import { i as countLiveOwnedDevices, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal } from "./device-capacity-Ic-kdmEV.mjs";
12
+ import { i as ensureOwnedIosDevice, r as ensureIosBooted } from "./device-ios-DzpSlZyd.mjs";
13
+ import { t as reconcileSimSlim } from "./simslim-CdWKT3vA.mjs";
14
14
  import { claimRemoveCommand, clearClaimChild, markClaimChildPending, processGroupAlive, releaseClaim, setClaimChild } from "@stim-cli/core/ownership-claim";
15
15
  import { randomUUID } from "node:crypto";
16
16
  import { existsSync } from "node:fs";
@@ -227,9 +227,7 @@ async function prepareOwnedAvd({ projectPath, slot, label, previousAvdName, syst
227
227
  slot,
228
228
  expectedRecord: reservation
229
229
  },
230
- onRemoved: () => {
231
- clearDevice(projectPath, "android", slot, avdName);
232
- }
230
+ onRemoved: () => withConfigLockAsync(() => clearDevice(projectPath, "android", slot, avdName))
233
231
  });
234
232
  const orphan = cleanup.status === "failed" || cleanup.status === "skipped" ? ` The owned AVD remains tracked for cleanup (${cleanup.reason || cleanup.status}); fix the cause, then retry or run \`stim gc --delete\`.` : "";
235
233
  throw new Error(`Created owned AVD ${avdName}, but could not configure its AVD settings: ${String(error?.message || error)}${orphan}`, { cause: error });
@@ -257,9 +255,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
257
255
  slot,
258
256
  expectedRecord: record
259
257
  },
260
- onRemoved: () => {
261
- clearDevice(projectPath, "android", slot, avdName);
262
- }
258
+ onRemoved: () => withConfigLockAsync(() => clearDevice(projectPath, "android", slot, avdName))
263
259
  });
264
260
  if (cleanup.status === "failed" || cleanup.status === "skipped") throw new AvdRecoveryError(`Owned AVD ${record.avdName} has incomplete setup and could not be deleted (${cleanup.reason || cleanup.status}). Fix the cause, then retry; Stim kept the device record for cleanup.`, "Wait for any active AVD operation to finish. If the refusal names an unresolved claim, inspect its creator and native processes before removing only that claim. Retry `stim android` to reconcile the incomplete device.");
265
261
  record = null;
@@ -277,9 +273,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
277
273
  slot,
278
274
  expectedRecord: record
279
275
  },
280
- onRemoved: () => {
281
- clearDevice(projectPath, "android", slot, avdName);
282
- }
276
+ onRemoved: () => withConfigLockAsync(() => clearDevice(projectPath, "android", slot, avdName))
283
277
  });
284
278
  if (cleanup.status === "failed" || cleanup.status === "skipped") throw new AvdRecoveryError(`Owned AVD ${avdName} never finished a boot, but could not be deleted to create one on ${requestedImage} (${cleanup.reason || cleanup.status}). Stim kept the device record.`, "Fix the cause, then retry, or pass `--slot <name>` to create the requested emulator beside it.");
285
279
  out(phaseLine("device", `deleted ${avdName}, which never finished a boot, to create one on ${requestedImage}`));
@@ -290,7 +284,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
290
284
  const configurationBeforeDefaults = avdPoolConfiguration(androidDataPartitionSizeGbSetting(settings), projectAvdConfig, deviceProfile);
291
285
  if (record?.avdName) {
292
286
  if (record.owned) {
293
- const resolved = await resolveOwnedAvdSerialAsync(record.avdName);
287
+ const resolved = await resolveOwnedAvdSerialAsync(record.avdName, { preferredSerial: record.consolePort ? `emulator-${record.consolePort}` : void 0 });
294
288
  const currentProfile = resolved.notOwned || resolved.missing ? null : ownedAvdDeviceProfile(record.avdName);
295
289
  if (requestedProfile && currentProfile && currentProfile !== requestedProfile) throw new AvdRecoveryError(`this project's emulator uses device profile ${currentProfile}, but ${requestedProfile} was requested. Stim will not silently boot a different model.`, "Run `stim worktree remove` (or `stim gc --delete`) to reap the current emulator, then `stim android` again to create the requested one, or pass `--slot <name>` to create it beside the current one.");
296
290
  if (resolved.notOwned) note(chalk.yellow(`Note: recorded AVD ${record.avdName} is not Stim-owned -- creating a fresh owned AVD instead of reusing it.`));
@@ -304,7 +298,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
304
298
  owned: true,
305
299
  deviceName: record.deviceName ?? record.avdName
306
300
  };
307
- setDevice(projectPath, "android", updated, slot);
301
+ await withConfigLockAsync(() => setDevice(projectPath, "android", updated, slot));
308
302
  return {
309
303
  ...updated,
310
304
  systemImage: ownedAvdSystemImage(record.avdName),
@@ -369,7 +363,7 @@ async function ensureOwnedAndroidDevice({ record, projectPath, slot, settingsRoo
369
363
  poolConfiguration: parked.configuration,
370
364
  adoptionPending: true
371
365
  };
372
- if (!adoptParked({
366
+ if (!await adoptParked({
373
367
  platform: "android",
374
368
  projectPath,
375
369
  slot,
@@ -469,14 +463,15 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
469
463
  platform: "android",
470
464
  key: avdName
471
465
  }, async () => {
472
- const claim = claimAndroidConsolePort({
466
+ const livePorts = liveAndroidConsolePorts();
467
+ const claim = await withConfigLockAsync(() => claimAndroidConsolePort({
473
468
  projectPath,
474
469
  slot,
475
470
  avdName,
476
471
  deviceName,
477
- livePorts: liveAndroidConsolePorts(),
472
+ livePorts,
478
473
  metadata
479
- });
474
+ }));
480
475
  const serial = `emulator-${claim.consolePort}`;
481
476
  try {
482
477
  reportAndroidMemoryPressure(out);
@@ -492,7 +487,7 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
492
487
  if (result.failed) throw new AvdBootError(result.reason, result.remedy);
493
488
  const running = await getAvdNameForSerialAsync(serial);
494
489
  if (running && running !== avdName) throw new Error(`${serial} is running AVD ${running}, not this workspace's owned AVD ${avdName}; refusing to use it.`);
495
- clearAndroidBootPending(projectPath, avdName, slot);
490
+ await withConfigLockAsync(() => clearAndroidBootPending(projectPath, avdName, slot));
496
491
  await muteBootedEmulator(serial, avdName, out);
497
492
  const { bootPending: _booted, ...booted } = claim;
498
493
  return {
@@ -501,7 +496,7 @@ async function bootOwnedAvdOnFreshPort({ avdName, deviceSlotWait, metadata, proj
501
496
  setup: true
502
497
  };
503
498
  } catch (error) {
504
- releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
499
+ await withConfigLockAsync(() => releaseAndroidConsolePort(projectPath, claim.consolePort, slot));
505
500
  throw error;
506
501
  }
507
502
  }, {
@@ -566,11 +561,11 @@ async function muteBootedEmulator(serial, avdName, out) {
566
561
  function reportAndroidMemoryPressure(out) {
567
562
  const pressure = readHostMemoryPressure();
568
563
  if (pressure === "warning" || pressure === "critical") {
569
- const named = memoryCulpritAdvice(memoryCulpritsUnder(pressure));
570
- out(chalk.dim(phaseLine("memory", `macOS reports ${pressure} host memory pressure; emulator boot may be slow.${named ? ` ${named}` : ""} Free memory with \`stim stop\` only in workspaces you own; ask before closing other apps or devices.`)));
564
+ out(chalk.dim(phaseLine("memory", `macOS reports ${pressure} host memory pressure; emulator boot may be slow. Free memory with \`stim stop\` only in workspaces you own; ask before closing other apps or devices.`)));
565
+ reportMemoryCulprits(pressure, (named) => out(chalk.dim(phaseLine("memory", named))));
571
566
  }
572
567
  }
573
- function androidBootRemedy(pressure) {
568
+ async function androidBootRemedy(pressure) {
574
569
  let count = null;
575
570
  try {
576
571
  const live = countLiveOwnedDevices({
@@ -583,7 +578,7 @@ function androidBootRemedy(pressure) {
583
578
  });
584
579
  count = typeof live === "number" ? live : null;
585
580
  } catch {}
586
- const named = memoryCulpritAdvice(memoryCulpritsUnder(pressure));
581
+ const named = memoryCulpritAdvice(await memoryCulpritsUnderAsync(pressure));
587
582
  const observation = pressure === "warning" || pressure === "critical" ? `macOS reports ${pressure} host memory pressure. ${named ? `${named} ` : ""}` : "";
588
583
  const devices = count ? `${count} Stim-owned ${count === 1 ? "device is" : "devices are"} running. ` : "";
589
584
  if (observation || devices) return `${observation}${devices}Stop an unneeded device with \`stim stop\` only in a workspace you own, then run \`stim android\` again; ask before closing other apps or devices. These observations do not establish the cause of the timeout or an OOM crash.`;
@@ -617,7 +612,7 @@ async function waitForAndroidBoot({ serial, timeoutMs, pid = null, alive = pidEx
617
612
  return {
618
613
  failed: true,
619
614
  reason: `${exited ? `The emulator process for ${serial} exited before the device finished booting.` : `Emulator ${serial} did not finish booting within ${Math.round(elapsedMs / 1e3)}s.`} Diagnostic: ${JSON.stringify(result.diagnostic)}`,
620
- remedy: exited ? "Inspect the emulator log for the process exit, fix what it reports, then run `stim android` again." : androidBootRemedy(pressure)
615
+ remedy: exited ? "Inspect the emulator log for the process exit, fix what it reports, then run `stim android` again." : await androidBootRemedy(pressure)
621
616
  };
622
617
  }
623
618
  async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot, timeoutMs, out, logFile = null, alive = pidExists }) {
@@ -627,7 +622,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
627
622
  };
628
623
  let resolved;
629
624
  try {
630
- resolved = await resolveOwnedAvdSerialAsync(device.avdName);
625
+ resolved = await resolveOwnedAvdSerialAsync(device.avdName, { preferredSerial: device.consolePort ? `emulator-${device.consolePort}` : void 0 });
631
626
  } catch (e) {
632
627
  return {
633
628
  failed: true,
@@ -643,8 +638,8 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
643
638
  reason: `AVD ${device.avdName} is not Stim-owned; refusing to boot it.`
644
639
  };
645
640
  const avdName = device.avdName;
646
- const booted = (result) => {
647
- if (!result.failed) clearAndroidBootPending(projectPath, avdName, slot);
641
+ const booted = async (result) => {
642
+ if (!result.failed) await withConfigLockAsync(() => clearAndroidBootPending(projectPath, avdName, slot));
648
643
  return result;
649
644
  };
650
645
  if (resolved.serial) return booted(await waitForAndroidBoot({
@@ -659,14 +654,15 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
659
654
  out
660
655
  }));
661
656
  const boot = async () => {
662
- const claim = claimAndroidConsolePort({
657
+ const livePorts = liveAndroidConsolePorts();
658
+ const claim = await withConfigLockAsync(() => claimAndroidConsolePort({
663
659
  projectPath,
664
660
  slot,
665
661
  avdName,
666
662
  deviceName: device.deviceName,
667
- livePorts: liveAndroidConsolePorts(),
663
+ livePorts,
668
664
  metadata: device
669
- });
665
+ }));
670
666
  const serial = `emulator-${claim.consolePort}`;
671
667
  reportAndroidMemoryPressure(out);
672
668
  out(chalk.dim(phaseLine("device", `booting ${avdName} as ${serial}`)));
@@ -674,7 +670,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
674
670
  try {
675
671
  pid = await bootAndroidEmulator(avdName, claim.consolePort, { logFile });
676
672
  } catch (e) {
677
- releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
673
+ await withConfigLockAsync(() => releaseAndroidConsolePort(projectPath, claim.consolePort, slot));
678
674
  return {
679
675
  failed: true,
680
676
  reason: `Could not start emulator for AVD ${avdName}: ${e?.message || e}`
@@ -687,7 +683,7 @@ async function ensureAndroidBooted({ device, deviceSlotWait, projectPath, slot,
687
683
  alive,
688
684
  out
689
685
  });
690
- if (result.failed) releaseAndroidConsolePort(projectPath, claim.consolePort, slot);
686
+ if (result.failed) await withConfigLockAsync(() => releaseAndroidConsolePort(projectPath, claim.consolePort, slot));
691
687
  else await muteBootedEmulator(serial, avdName, out);
692
688
  return booted(result);
693
689
  };
@@ -721,7 +717,7 @@ function didSetUpDevice(device, remote) {
721
717
  return remote ? void 0 : Boolean(device.setup || device.booting);
722
718
  }
723
719
  async function ensureOwnedDevice({ platform, project, projectPath, slot, settingsRoot = projectPath, label = ownedDeviceLabel(projectPath), settings, flags = {}, note = () => {}, out = () => {}, logFile = null, alive = pidExists, configureAvd = configureNewOwnedAvd, teardownAvd = teardownOwnedAvd, reconcileIosSimulator = reconcileSimSlim, simSnapshot }) {
724
- clearDeviceIdleShutdown(projectPath, platform, slot);
720
+ await clearDeviceIdleShutdown(projectPath, platform, slot);
725
721
  if (slot && slot !== "default") label = `${label}-${slot}`;
726
722
  const record = deviceSlotPlatforms(project, slot)?.[platform] ?? null;
727
723
  if (platform === "ios") return ensureOwnedIosDevice({
@@ -1,15 +1,15 @@
1
- import { a as workspaceProcessLockError, i as withWorkspaceProcessLock, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, d as workspaceProcessLockError, u as withWorkspaceProcessLock } from "./exec-VFRpu1iA.mjs";
2
2
  import { m as workspaceLogsDir$1 } from "./paths-DQtTgsBf.mjs";
3
- import { G as projectDeviceSlots, H as deviceSlotPlatforms, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
4
- import { a as formatElapsed, l as phaseLine } from "./command-output-Db8BqzxH.mjs";
5
- import { g as deviceReclaimIdleMinutesSetting } from "./settings-C7O8A6ZI.mjs";
3
+ import { G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, d as getConfigDir, u as getConcurrencyLimits } from "./config-BZhXY15H.mjs";
4
+ import { a as formatElapsed, l as phaseLine } from "./command-output-DxC0k2rk.mjs";
5
+ import { g as deviceReclaimIdleMinutesSetting } from "./settings-RKwY33wv.mjs";
6
+ import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-882m4hxX.mjs";
6
7
  import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
7
- import { K as recordCapacityRefusal, q as recordCapacityWait } from "./budget-DnPX3DXj.mjs";
8
+ import { J as recordCapacityRefusal, Y as recordCapacityWait } from "./budget-dPGuhNai.mjs";
8
9
  import { t as canonicalPath } from "./paths-BsJMoPP2.mjs";
9
- import { f as withIdleWorkspace } from "./workspaces-BxzYlo3P.mjs";
10
- import { A as listAdbDevices, j as listAdbDevicesAsync } from "./android-C7sVmyI9.mjs";
11
- import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-hcBpnEGk.mjs";
12
- import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-DO7oIRlc.mjs";
10
+ import { p as withIdleWorkspace } from "./workspaces-CSV2Orf4.mjs";
11
+ import { d as listAllIosSims, f as listAllIosSimsAsync, l as iosRuntimeMatches, y as parseRuntimeVersion } from "./ios-CVUFFZ6C.mjs";
12
+ import { n as dueIdleDevices, r as shutDownIdleDevices } from "./idle-shutdown-BInjLKqm.mjs";
13
13
  import { realpathSync } from "node:fs";
14
14
  import { basename, join } from "node:path";
15
15
  import { LOG_ROTATE_BYTES, workspaceId } from "@stim-cli/core";
@@ -524,24 +524,28 @@ async function withDeviceBootAdmission(device, boot, { root, max = getConcurrenc
524
524
  await sleep(Math.min(2e3, Math.max(0, waitMs - elapsedMs)));
525
525
  }
526
526
  } catch (error) {
527
- if (error instanceof DeviceAdmissionRefusal && error.code === "STIM_AT_CAPACITY") recordCapacityRefusal({
528
- platform: device.platform,
529
- max,
530
- workspace
531
- }, now());
527
+ if (error instanceof DeviceAdmissionRefusal && error.code === "STIM_AT_CAPACITY") {
528
+ const at = now();
529
+ await withConfigLockAsync$1(() => recordCapacityRefusal({
530
+ platform: device.platform,
531
+ max,
532
+ workspace
533
+ }, at)).catch(() => {});
534
+ }
532
535
  throw error;
533
536
  } finally {
534
537
  (0, ownership_claim_exports.releaseClaim)(ticket);
535
538
  if (visibleWait) waitingFor(null);
536
539
  if (started !== void 0) {
537
540
  const ms = Math.max(0, Math.round(now() - started));
538
- recordCapacityWait({
541
+ const at = now();
542
+ await withConfigLockAsync$1(() => recordCapacityWait({
539
543
  platform: device.platform,
540
544
  ms,
541
545
  max,
542
546
  workspace,
543
547
  ...reclaimed ? { reclaimed } : {}
544
- }, now());
548
+ }, at)).catch(() => {});
545
549
  onWait(ms);
546
550
  }
547
551
  }
@@ -1,21 +1,21 @@
1
- import { t as getExecutor } from "./exec-DEoAhcze.mjs";
1
+ import { t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { n as ensureWorkspaceStorage } from "./paths-DQtTgsBf.mjs";
3
- import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-DlrsduwG.mjs";
4
- import { d as writeWorkspaceState } from "./workspace-state-U08dEzhG.mjs";
5
- import { i as macosProcess, o as requiredMacosRecord } from "./state-08I3hw3_.mjs";
3
+ import { O as withConfigLockAsync$1, _ as loadConfig$1, c as ensureConfig } from "./config-BZhXY15H.mjs";
4
+ import { d as writeWorkspaceState } from "./workspace-state-CeBpIZgr.mjs";
5
+ import { i as macosProcess, o as requiredMacosRecord } from "./state-BfAltYJP.mjs";
6
+ import { A as listAdbDevices, D as getAvdNameForSerial, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, M as listAvdDeviceProfiles, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, ct as waitForBoot, d as androidToolPath, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, nt as resolveOwnedAvdSerialAsync, t as DEFAULT_AVD_DEVICE_PROFILE, tt as resetAdoptedAvd, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-882m4hxX.mjs";
7
+ import { n as forgetCreatedDeviceAsync } from "./created-devices-D2Aca-xu.mjs";
8
+ import { a as parsePidof, i as parseLogcatLine, t as androidClockOffset } from "./android-CX5IcRuf.mjs";
6
9
  import { r as createNdjsonWriter } from "./ndjson-CgE_o3Dl.mjs";
7
- import { Cn as launchAndroidApp, Dn as reverseMetroPorts, On as writeDebugHttpHost, Sn as iosAppProcess, Tn as launchIosApp, dn as androidAppProcess, wn as launchAndroidReleaseApp, xn as installIosApp, yn as installAndroidApp } from "./budget-DnPX3DXj.mjs";
8
- import { D as teardownOwnedAvd, k as teardownOwnedIosSim } from "./workspaces-BxzYlo3P.mjs";
9
- import { t as forgetCreatedDevice } from "./created-devices-x9rN6bhs.mjs";
10
- import { $ as resetAdoptedAvd, A as listAdbDevices, D as getAvdNameForSerial, F as listAvdsAsync, I as listInstalledSystemImages, K as ownedAvdSystemImage, M as listAvdDeviceProfiles, O as getAvdNameForSerialAsync, U as ownedAvdName, X as pickDefaultSystemImage, a as androidDeviceAbi, d as androidToolPath, et as resolveOwnedAvdSerialAsync, f as assertOwnedAvdStopped, g as avdPathExists, k as hostSystemImageArch, ot as waitForBoot, t as DEFAULT_AVD_DEVICE_PROFILE, v as avdStorageRoots, x as createOwnedAvd, y as bootAndroidEmulator } from "./android-C7sVmyI9.mjs";
11
- import { C as resetIosKeychain, P as readHostMemoryPressure, T as resolveIosCreation, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, k as uninstallIosApp, n as bootIosSim, w as resetIosPrivacy } from "./ios-hcBpnEGk.mjs";
12
- import { r as stopMacosAppHeld } from "./stop-DzLJc7Ei.mjs";
10
+ import { An as writeDebugHttpHost, Cn as installIosApp, Dn as launchIosApp, En as launchAndroidReleaseApp, Tn as launchAndroidApp, kn as reverseMetroPorts, pn as androidAppProcess, wn as iosAppProcess, xn as installAndroidApp } from "./budget-dPGuhNai.mjs";
11
+ import { A as teardownOwnedIosSim, O as teardownOwnedAvd } from "./workspaces-CSV2Orf4.mjs";
12
+ import { C as resetIosKeychain, F as readHostMemoryPressure, T as resolveIosCreation, a as createOwnedIosSim, d as listAllIosSims, g as listUserApps, k as uninstallIosApp, n as bootIosSim, w as resetIosPrivacy } from "./ios-CVUFFZ6C.mjs";
13
+ import { r as stopMacosAppHeld } from "./stop-DhclRwOO.mjs";
13
14
  import { t as spawnEntry } from "./spawn-entry-jw19m8Nl.mjs";
14
- import { i as countLiveOwnedDevices } from "./device-capacity-CjaSdrhg.mjs";
15
- import { n as parseLogcatLine, r as parsePidof, t as androidClockOffset } from "./android-DR5lZ2Az.mjs";
16
- import { _ as findAapt } from "./support-DTBV56gy.mjs";
17
- import { t as waitForMacosRegistration } from "./registration-BcRgF6Ox.mjs";
18
- import { n as parseLogStreamLine } from "./ios-xtlRHaeB.mjs";
15
+ import { i as countLiveOwnedDevices } from "./device-capacity-Ic-kdmEV.mjs";
16
+ import { _ as findAapt } from "./support-B3tzVhKn.mjs";
17
+ import { t as waitForMacosRegistration } from "./registration-CN6nlhcD.mjs";
18
+ import { n as parseLogStreamLine } from "./ios-ENC4sRPA.mjs";
19
19
  import { createHash, randomUUID } from "node:crypto";
20
20
  import { chmodSync, closeSync, copyFileSync, createReadStream, existsSync, lstatSync, mkdirSync, openSync, readFileSync, readdirSync, realpathSync, renameSync, rmSync, statfsSync, symlinkSync, writeFileSync } from "node:fs";
21
21
  import { availableParallelism, freemem, homedir, loadavg } from "node:os";
@@ -652,7 +652,7 @@ async function runHostedDevice(mode, selectors, app) {
652
652
  if (outcome.status !== "torn-down" && outcome.status !== "missing") throw new Error(outcome.reason ?? "Hosted simulator teardown was not established.");
653
653
  const after = inventory().find((sim) => sim.udid === device.udid);
654
654
  if (after) throw new Error(`Hosted simulator ${device.udid} is still listed (${after.state}); deletion could not be verified. If its runtime is unavailable, delete it with xcrun simctl delete and stop the session again.`);
655
- forgetCreatedDevice("ios", device.udid);
655
+ await forgetCreatedDeviceAsync("ios", device.udid);
656
656
  removeHostedAppData(home);
657
657
  return {
658
658
  state: "stopped",
@@ -851,7 +851,7 @@ async function runHostedAndroidDevice(mode, request, app) {
851
851
  const name = device.avdName;
852
852
  if ((await listAvdsAsync({ timeoutMs: 5e3 })).includes(name) || avdStorageRoots().some((root) => avdPathExists(join(root, `${name}.ini`)) || avdPathExists(join(root, `${name}.avd`)))) throw new Error("The hosted AVD or its data still exists; deletion could not be verified.");
853
853
  if (await getAvdNameForSerialAsync(device.serial) === device.avdName) throw new Error("The hosted Android emulator is still running.");
854
- if (ledger === "listed") forgetCreatedDevice("android", device.avdName);
854
+ if (ledger === "listed") await forgetCreatedDeviceAsync("android", device.avdName);
855
855
  removeHostedAppData(home);
856
856
  return {
857
857
  state: "stopped",
@@ -1,13 +1,12 @@
1
- import { i as withWorkspaceProcessLock, t as getExecutor, x as ownership_claim_exports } from "./exec-DEoAhcze.mjs";
1
+ import { D as ownership_claim_exports, o as cancellableSleep, t as getExecutor, u as withWorkspaceProcessLock } from "./exec-VFRpu1iA.mjs";
2
2
  import { f as workspaceId$1 } from "./paths-DQtTgsBf.mjs";
3
- import { C as saveConfig, D as withConfigLock$1, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, d as getConfigDir, w as setDevice } from "./config-DlrsduwG.mjs";
4
- import { l as phaseLine } from "./command-output-Db8BqzxH.mjs";
5
- import { u as cancellableSleep } from "./operation-exec-BW0em61G.mjs";
6
- import { T as iosSimSlimProfileSetting } from "./settings-C7O8A6ZI.mjs";
7
- import { j as teardownParkedIosSim } from "./workspaces-BxzYlo3P.mjs";
8
- import { _t as parkedMaxSetting, bt as selectParked, ft as adoptParked, pt as dropParked, vt as readParked } from "./android-C7sVmyI9.mjs";
9
- import { A as configuredIosSimulatorViewer, C as resetIosKeychain, E as resolveOwnedIosSim, M as hostMemoryPressureAdvice, N as memoryCulpritsUnder, P as readHostMemoryPressure, S as renameIosSim, T as resolveIosCreation, _ as ownedSimName, a as createOwnedIosSim, d as listAllIosSims, f as listAllIosSimsAsync, h as listIosRuntimesAsync, n as bootIosSim, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, w as resetIosPrivacy, y as parseRuntimeVersion } from "./ios-hcBpnEGk.mjs";
10
- import { l as runtimeMismatch, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal, o as deviceTypeMismatch } from "./device-capacity-CjaSdrhg.mjs";
3
+ import { C as saveConfig, G as projectDeviceSlots, H as deviceSlotPlatforms, O as withConfigLockAsync$1, _ as loadConfig$1, a as clearDevice, d as getConfigDir, w as setDevice } from "./config-BZhXY15H.mjs";
4
+ import { l as phaseLine } from "./command-output-DxC0k2rk.mjs";
5
+ import { T as iosSimSlimProfileSetting } from "./settings-RKwY33wv.mjs";
6
+ import { mt as dropParked, pt as adoptParked, vt as parkedMaxSetting, xt as selectParked, yt as readParked } from "./android-882m4hxX.mjs";
7
+ import { M as teardownParkedIosSim } from "./workspaces-CSV2Orf4.mjs";
8
+ import { A as configuredIosSimulatorViewer, C as resetIosKeychain, E as resolveOwnedIosSim, F as readHostMemoryPressure, L as reportMemoryCulprits, M as hostMemoryPressureAdvice, S as renameIosSim, T as resolveIosCreation, _ as ownedSimName, a as createOwnedIosSim, d as listAllIosSims, f as listAllIosSimsAsync, h as listIosRuntimesAsync, n as bootIosSim, p as listIosDeviceTypesAsync, u as iosSimulatorFailureAdvice, w as resetIosPrivacy, y as parseRuntimeVersion } from "./ios-CVUFFZ6C.mjs";
9
+ import { l as runtimeMismatch, m as withDeviceBootAdmission, n as DeviceAdmissionRefusal, o as deviceTypeMismatch } from "./device-capacity-Ic-kdmEV.mjs";
11
10
  import { ambientContext } from "@stim-cli/core";
12
11
  import { isJsonObject } from "@stim-cli/core/state";
13
12
  import chalk from "chalk";
@@ -18,13 +17,12 @@ function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlo
18
17
  key: udid
19
18
  }, async () => {
20
19
  out(chalk.dim(phaseLine("device", `booting ${label} (${udid})`)));
21
- await bootIosSim(udid, {
20
+ await muteBootedSimulator(udid, await bootIosSim(udid, {
22
21
  label,
23
22
  out,
24
23
  simulatorApp,
25
24
  env: ambientContext()?.env
26
- });
27
- await muteBootedSimulator(udid, out);
25
+ }), out);
28
26
  await configure();
29
27
  }, {
30
28
  ...deviceSlotWait,
@@ -37,8 +35,9 @@ function startIosBoot(udid, configure, label, out, simulatorApp, root, deviceSlo
37
35
  done
38
36
  };
39
37
  }
40
- async function muteBootedSimulator(udid, out) {
38
+ async function muteBootedSimulator(udid, { springBoardUnreadable }, out) {
41
39
  try {
40
+ if (springBoardUnreadable) throw new Error(springBoardUnreadable);
42
41
  const response = JSON.parse(await getExecutor().runFileAsync("xcrun", [
43
42
  "devicectl",
44
43
  "device",
@@ -62,8 +61,9 @@ var IosDeviceMismatchError = class extends Error {
62
61
  };
63
62
  async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, label, settings, flags, note, out, reconcileIosSimulator, simSnapshot }) {
64
63
  const pressure = readHostMemoryPressure();
65
- const memoryAdvice = hostMemoryPressureAdvice(pressure, memoryCulpritsUnder(pressure));
64
+ const memoryAdvice = hostMemoryPressureAdvice(pressure);
66
65
  if (memoryAdvice) out(chalk.yellow(phaseLine("memory", memoryAdvice)));
66
+ reportMemoryCulprits(pressure, (named) => out(chalk.yellow(phaseLine("memory", named))));
67
67
  const simslimProfile = iosSimSlimProfileSetting(settings, settingsRoot);
68
68
  if (record?.deviceUdid) {
69
69
  if (record.owned) {
@@ -172,11 +172,11 @@ async function ensureOwnedIosDevice({ record, projectPath, slot, settingsRoot, l
172
172
  runtime: choice.runtime
173
173
  }, projectPath, void 0, await listAllIosSimsAsync({ includeUnavailable: true }));
174
174
  const result = await createOwnedIosSim(label, { suffix }, choice);
175
- setDevice(projectPath, "ios", {
175
+ await withConfigLockAsync$1(() => setDevice(projectPath, "ios", {
176
176
  deviceUdid: result.udid,
177
177
  owned: true,
178
178
  deviceName: result.name
179
- }, slot);
179
+ }, slot));
180
180
  return result;
181
181
  });
182
182
  const newRecord = {
@@ -265,7 +265,7 @@ async function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
265
265
  ...parked.simslimManaged ? { simslimManaged: true } : {},
266
266
  ...parked.cacheKey ? { parkedCacheKey: parked.cacheKey } : {}
267
267
  };
268
- const adopted = adoptParked({
268
+ const adopted = await adoptParked({
269
269
  platform: "ios",
270
270
  projectPath,
271
271
  slot,
@@ -284,7 +284,7 @@ async function takeParkedIosSim({ projectPath, slot, label, choice, out }) {
284
284
  return null;
285
285
  }
286
286
  function clearIosAdoptionPending(projectPath, slot = "default") {
287
- withConfigLock$1(() => {
287
+ return withConfigLockAsync$1(() => {
288
288
  const cfg = loadConfig$1();
289
289
  const ios = deviceSlotPlatforms(cfg?.projects?.[projectPath], slot)?.ios;
290
290
  if (!cfg || !ios?.adoptionPending) return;
@@ -303,7 +303,7 @@ async function configureOwnedIosSim({ record, projectPath, slot, profile, out, r
303
303
  ...record,
304
304
  simslimManaged: true
305
305
  };
306
- setDevice(projectPath, "ios", pending, slot);
306
+ await withConfigLockAsync$1(() => setDevice(projectPath, "ios", pending, slot));
307
307
  record = pending;
308
308
  }
309
309
  const result = await reconcileIosSimulator({
@@ -316,7 +316,7 @@ async function configureOwnedIosSim({ record, projectPath, slot, profile, out, r
316
316
  const updated = { ...record };
317
317
  if (result.managed) updated.simslimManaged = true;
318
318
  else delete updated.simslimManaged;
319
- setDevice(projectPath, "ios", updated, slot);
319
+ await withConfigLockAsync$1(() => setDevice(projectPath, "ios", updated, slot));
320
320
  return updated;
321
321
  }
322
322
  async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorApp, timeoutMs, pollMs, out }) {
@@ -341,7 +341,7 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
341
341
  } catch (error) {
342
342
  return {
343
343
  failed: true,
344
- reason: `Simulator ${udid} failed its process-spawn readiness check: ${error?.message || error}. ${iosSimulatorFailureAdvice()}`
344
+ reason: `Simulator ${udid} failed its process-spawn readiness check: ${error?.message || error}. ${await iosSimulatorFailureAdvice()}`
345
345
  };
346
346
  }
347
347
  };
@@ -389,14 +389,13 @@ async function ensureIosBooted({ device, projectPath, deviceSlotWait, simulatorA
389
389
  key: udid
390
390
  }, async () => {
391
391
  out(chalk.dim(phaseLine("device", `booting ${sim.name} (${udid})`)));
392
- await bootIosSim(udid, {
392
+ await muteBootedSimulator(udid, await bootIosSim(udid, {
393
393
  timeoutMs,
394
394
  label: sim.name,
395
395
  out,
396
396
  simulatorApp,
397
397
  env: ambientContext()?.env
398
- });
399
- await muteBootedSimulator(udid, out);
398
+ }), out);
400
399
  }, {
401
400
  ...deviceSlotWait,
402
401
  root: projectPath,
@@ -1,8 +1,8 @@
1
- import { m as operationState } from "./exec-DEoAhcze.mjs";
2
- import { V as deviceSlotKey } from "./config-DlrsduwG.mjs";
3
- import { a as formatElapsed, r as clockTime } from "./command-output-Db8BqzxH.mjs";
4
- import { Zt as VERIFY_TIMEOUT_MS, on as APP_READINESS_TIMEOUT_MS } from "./budget-DnPX3DXj.mjs";
5
- import { E as releaseRunLease, S as parseLease, T as raiseLease, b as leaseIsExpired, j as takeLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-B5RtpFda.mjs";
1
+ import { b as operationState } from "./exec-VFRpu1iA.mjs";
2
+ import { V as deviceSlotKey } from "./config-BZhXY15H.mjs";
3
+ import { a as formatElapsed, r as clockTime } from "./command-output-DxC0k2rk.mjs";
4
+ import { $t as VERIFY_TIMEOUT_MS, cn as APP_READINESS_TIMEOUT_MS } from "./budget-dPGuhNai.mjs";
5
+ import { E as releaseRunLease, S as parseLease, T as raiseLease, b as leaseIsExpired, j as takeLease, v as deviceLeasePath, y as fileLeaseIo } from "./activity-Dq3ZcdD8.mjs";
6
6
  //#region src/engine/device-lease-run.ts
7
7
  const LEASE_STEP_FLOOR_MS = 6e4;
8
8
  const DEBUG_VERIFY_STEP_MS = VERIFY_TIMEOUT_MS + APP_READINESS_TIMEOUT_MS;
@@ -1,6 +1,6 @@
1
- import { V as deviceSlotKey } from "./config-DlrsduwG.mjs";
2
- import { A as selectPoolDevice, S as parseLease, b as leaseIsExpired, v as deviceLeasePath, y as fileLeaseIo } from "./activity-B5RtpFda.mjs";
3
- import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-BgwPHc6u.mjs";
1
+ import { V as deviceSlotKey } from "./config-BZhXY15H.mjs";
2
+ import { A as selectPoolDevice, S as parseLease, b as leaseIsExpired, v as deviceLeasePath, y as fileLeaseIo } from "./activity-Dq3ZcdD8.mjs";
3
+ import { i as DEVICE_WAIT_POLL_MS, n as DEVICE_BUSY, o as leaseExpiryText } from "./device-lease-run-DUtkbqBQ.mjs";
4
4
  //#region src/engine/device-pool.ts
5
5
  function heldPoolId(root, platform, now, io = fileLeaseIo, slot = "default") {
6
6
  const record = io.readHolder(root)[deviceSlotKey(platform, slot)];
@@ -1,2 +1,2 @@
1
- import { a as readDoctorReport, i as parseDoctorPlatform, n as doctorCommand, o as shadowedStimFinding, r as doctorSuccessLines, s as toolchainReport, t as applySandboxFix } from "./doctor-D2SN3Ltx.mjs";
1
+ import { a as readDoctorReport, i as parseDoctorPlatform, n as doctorCommand, o as shadowedStimFinding, r as doctorSuccessLines, s as toolchainReport, t as applySandboxFix } from "./doctor-DZgpqR6J.mjs";
2
2
  export { applySandboxFix, doctorCommand as default, doctorSuccessLines, parseDoctorPlatform, readDoctorReport, shadowedStimFinding, toolchainReport };
@@ -1,29 +1,29 @@
1
- import { _ as reportSignal, t as getExecutor, y as trackReportResource } from "./exec-DEoAhcze.mjs";
1
+ import { C as reportSignal, T as trackReportResource, t as getExecutor } from "./exec-VFRpu1iA.mjs";
2
2
  import { i as sharedBuildCache, u as workspaceDerivedData } from "./paths-DQtTgsBf.mjs";
3
- import { _ as loadConfig$1, nt as realIo, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-DlrsduwG.mjs";
4
- import { d as quotedPath, u as plural } from "./command-output-Db8BqzxH.mjs";
5
- import { l as gitQuietAsync, o as git } from "./operation-exec-BW0em61G.mjs";
6
- import { r as readWorkspaceState$1 } from "./workspace-state-U08dEzhG.mjs";
7
- import { D as mergeSettingsLayers, Et as listWorktreesAsync, Gt as temporaryRoot, Ht as makeTemporaryDirectory, I as projectSettingsContext, It as resolveSourceCheckoutAsync, K as resolveIosProjectDir, Mt as repoRoot, Nt as repoRootAsync, Ot as locallyKnownUpstreamAsync, Q as settingOrigin, T as iosSimSlimProfileSetting, U as remoteIosSetting, V as remoteAndroidSetting, Vt as filesystemDevice, W as resolveAndroidLayout, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, at as webSettings, et as settingShapeErrors, ht as dirtyFingerprintFiles, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, it as unknownSettingKeys, m as defaultAndroidLayout, nt as settingsLayers, r as PATH_SETTINGS, tt as settingValueAt, vt as gitCommonDirAsync } from "./settings-C7O8A6ZI.mjs";
8
- import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-CTLNHCfE.mjs";
9
- import { Bn as checkEasAuth$1, Gn as providerFromConfig, Ht as readInstalledEasCliVersionAsync, Wn as ownerFromConfig, er as MIN_EAS_CLI_SIMULATOR_VERSION, nr as easCliUpgradeRemedy, qn as resolveEasCliBin, tr as easCliSupport } from "./budget-DnPX3DXj.mjs";
10
- import { L as listBuildSlots } from "./workspaces-BxzYlo3P.mjs";
11
- import { N as listBuildLocks } from "./activity-B5RtpFda.mjs";
12
- import { a as diffFingerprintSources, l as fingerprintProject } from "./build-cache-Dv7RN200.mjs";
13
- import { _t as parkedMaxSetting, dt as POOL_SETTING_REMEDY, k as hostSystemImageArch, o as androidHome } from "./android-C7sVmyI9.mjs";
14
- import { F as readHostMemoryPressureAsync, M as hostMemoryPressureAdvice } from "./ios-hcBpnEGk.mjs";
3
+ import { _ as loadConfig$1, nt as realIo, s as configCorruptRepair, u as getConcurrencyLimits } from "./config-BZhXY15H.mjs";
4
+ import { d as quotedPath, u as plural } from "./command-output-DxC0k2rk.mjs";
5
+ import { l as gitQuietAsync, o as git } from "./operation-exec-CUZifp6Z.mjs";
6
+ import { r as readWorkspaceState$1 } from "./workspace-state-CeBpIZgr.mjs";
7
+ import { D as mergeSettingsLayers, Et as listWorktreesAsync, Gt as temporaryRoot, Ht as makeTemporaryDirectory, I as projectSettingsContext, It as resolveSourceCheckoutAsync, K as resolveIosProjectDir, Mt as repoRoot, Nt as repoRootAsync, Ot as locallyKnownUpstreamAsync, Q as settingOrigin, T as iosSimSlimProfileSetting, U as remoteIosSetting, V as remoteAndroidSetting, Vt as filesystemDevice, W as resolveAndroidLayout, Y as resolveSettings, a as SETTING_SHAPE_REMEDY, at as webSettings, et as settingShapeErrors, ht as dirtyFingerprintFiles, i as SETTINGS_WITH_RESOLVE_TIME_FALLBACK, it as unknownSettingKeys, m as defaultAndroidLayout, nt as settingsLayers, r as PATH_SETTINGS, tt as settingValueAt, vt as gitCommonDirAsync } from "./settings-RKwY33wv.mjs";
8
+ import { C as resolvePackageJson, _ as appProjectProblem, b as isPackageResolvable, v as detectIsExpo } from "./project-Dz-hWkb-.mjs";
9
+ import { ft as POOL_SETTING_REMEDY, k as hostSystemImageArch, o as androidHome, vt as parkedMaxSetting } from "./android-882m4hxX.mjs";
10
+ import { Hn as checkEasAuth$1, Kn as ownerFromConfig, Wt as readInstalledEasCliVersionAsync, Yn as resolveEasCliBin, ir as easCliUpgradeRemedy, nr as MIN_EAS_CLI_SIMULATOR_VERSION, qn as providerFromConfig, rr as easCliSupport } from "./budget-dPGuhNai.mjs";
11
+ import { R as listBuildSlots } from "./workspaces-CSV2Orf4.mjs";
12
+ import { N as listBuildLocks } from "./activity-Dq3ZcdD8.mjs";
13
+ import { d as fingerprintProject, o as diffFingerprintSources } from "./build-cache-HFUQ9eLz.mjs";
14
+ import { I as readHostMemoryPressureAsync, M as hostMemoryPressureAdvice } from "./ios-CVUFFZ6C.mjs";
15
15
  import { p as resolveOptimizations, u as compilerCacheFallbackMessage } from "./errors-ccaPc4ox.mjs";
16
- import { i as projectCmakeLauncher } from "./ccache-RcAy92gH.mjs";
17
- import { x as podInstallCommand } from "./xcode-iQnROM5o.mjs";
18
- import { h as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-CmJkTljQ.mjs";
19
- import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-CjaSdrhg.mjs";
20
- import { t as readDoctorFingerprint } from "./doctor-fingerprint-DZLoYFVb.mjs";
21
- import { i as probeSigningIdentities } from "./ios-signing-BtAffm0A.mjs";
22
- import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-Bbw689-6.mjs";
23
- import { i as installedNpmTreeIsValidAsync, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-1I9KZT1Y.mjs";
24
- import { n as simslimIsOnPath } from "./simslim-BNckWpXi.mjs";
25
- import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-CyjU5K7E.mjs";
26
- import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-ngferVq2.mjs";
16
+ import { i as projectCmakeLauncher } from "./ccache-CCn1S6qG.mjs";
17
+ import { x as podInstallCommand } from "./xcode-DHu41qQ4.mjs";
18
+ import { g as androidPathRoomRemedy, i as ccacheEnabled, l as androidSdkRefusal, m as androidPathRoomMessage, p as androidPathRoom, t as apkOutputsDir } from "./react-native-build-AuCu-aAP.mjs";
19
+ import { a as countLiveOwnedDevicesAsync, i as countLiveOwnedDevices } from "./device-capacity-Ic-kdmEV.mjs";
20
+ import { t as readDoctorFingerprint } from "./doctor-fingerprint-zlujA1Gs.mjs";
21
+ import { i as probeSigningIdentities } from "./ios-signing-4c_qXvQm.mjs";
22
+ import { a as findChrome, t as CHROME_INSTALL_REMEDY } from "./chrome-BvV8ssI3.mjs";
23
+ import { i as installedNpmTreeIsValidAsync, n as hasInstalledDependencies, t as dependencyState } from "./dependency-state-C56ll9hY.mjs";
24
+ import { n as simslimIsOnPath } from "./simslim-CdWKT3vA.mjs";
25
+ import { t as MIN_EAS_CLI_BUILD_DOWNLOAD_VERSION } from "./eas-build-CxKUNHsb.mjs";
26
+ import { r as resolveAndroidCompilerCache, t as readAndroidCasToolchain } from "./android-cas-BtCOrNqb.mjs";
27
27
  import { existsSync, lstatSync, readFileSync, readdirSync, realpathSync, rmSync } from "node:fs";
28
28
  import { basename, dirname, isAbsolute, join, relative, resolve, sep } from "node:path";
29
29
  import { LAST_BUILD_KEYS, isJsonObject, readBuildHistory, readJsonObject, readStats, settingDefinition } from "@stim-cli/core/state";
@@ -509,12 +509,12 @@ async function checkMainCheckout(projectRoot, { npmTreeValid, brokenPods = void
509
509
  podsState = "stale";
510
510
  }
511
511
  if (podsState) {
512
- const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot)}`;
512
+ const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot, iosRoot)}`;
513
513
  findings.push(finding("cost", `The source checkout CocoaPods state is ${podsState}`, `ios/Pods cannot be reused safely because its Manifest.lock ${podsState === "missing" ? "is absent" : "does not match ios/Podfile.lock"}.`, `Run \`${podCommand}\` before creating native worktrees, or let \`stim worktree warm --refresh\` run it from a linked worktree.`));
514
514
  }
515
515
  const broken = brokenPods === void 0 && existsSync$1(podsRoot) ? await brokenPodLinks(podsRoot) : brokenPods || [];
516
516
  if (broken.length) {
517
- const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot, "--clean-install")}`;
517
+ const podCommand = `cd ${quotedPath(iosRoot)} && ${podInstallCommand(mainRoot, iosRoot, "--clean-install")}`;
518
518
  findings.push(finding("cost", "The source checkout CocoaPods state has broken links", `${broken.length} symlink${broken.length === 1 ? "" : "s"} under ios/Pods point to missing files. Worktrees copy these broken links and can fail during compilation. First: ${broken[0]}.`, `Run \`${podCommand}\` before creating native worktrees.`));
519
519
  }
520
520
  }
@@ -904,7 +904,7 @@ function checkAndroidPathRoom(projectRoot, platform, host, hostArch = process.ar
904
904
  if (!room) return null;
905
905
  return {
906
906
  code: "android-path-room",
907
- ...finding("cost", "The project path leaves no room for Android native object paths", `${androidPathRoomMessage(room)} \`stim android\` refuses to build here with STIM_PATH_TOO_LONG, because Gradle would fail deep inside ninja instead.`, androidPathRoomRemedy(room))
907
+ ...finding("cost", "The project path leaves no room for Android native object paths", `${androidPathRoomMessage(room)} \`stim android\` refuses to run an emulator here with STIM_PATH_TOO_LONG, before it prepares the device, because Gradle would fail deep inside ninja instead.`, androidPathRoomRemedy(room))
908
908
  };
909
909
  }
910
910
  function hasAndroidProject(layout) {
@@ -965,7 +965,7 @@ function countActiveBuilds() {
965
965
  function checkFingerprintParity({ projectHash, worktreeHash, changed = [], dirtyFiles = [] } = {}) {
966
966
  if (!projectHash || !worktreeHash || projectHash === worktreeHash) return null;
967
967
  const names = changed.slice(0, 3).join(", ");
968
- return finding("note", "This checkout does not fingerprint like a fresh worktree of HEAD", `A clean detached worktree of HEAD computes a different @expo/fingerprint hash than this checkout, so worktrees will MISS the cache entries this checkout fills (and vice versa) until the two agree.${changed.length ? ` The differing source${changed.length === 1 ? "" : "s"}: ${names}${changed.length > 3 ? ` (and ${changed.length - 3} more)` : ""}.` : ""} ${dirtyFiles.length ? `The likely cause is uncommitted changes to tracked fingerprint inputs -- git reports ${dirtyFiles.slice(0, 3).join(", ")}${dirtyFiles.length > 3 ? ` (and ${dirtyFiles.length - 3} more)` : ""} dirty in this checkout.` : "The likely cause is uncommitted changes to tracked fingerprint inputs (this check compared against a clean worktree of HEAD)."} (To measure this, doctor ran a real fingerprint twice and briefly created a temporary git worktree -- .git/worktrees metadata was touched and cleaned up.)`, "Commit the dirty fingerprint inputs, or list the build-irrelevant ones in .fingerprintignore (same syntax as .gitignore, at the project root; Stim already ignores android/local.properties and android/.idea). Only the ones that genuinely cannot change the native build belong there -- generated reports, local env files, a lockfile whose checksums embed absolute machine paths. Never ignore a real native input (a Podfile, a gradle file, the app config) to force a hit: that trades a slow build for a wrong one.");
968
+ return finding("note", "This checkout does not fingerprint like a fresh worktree of HEAD", `A clean detached worktree of HEAD computes a different @expo/fingerprint hash than this checkout, so worktrees will MISS the cache entries this checkout fills (and vice versa) until the two agree.${changed.length ? ` The differing source${changed.length === 1 ? "" : "s"}: ${names}${changed.length > 3 ? ` (and ${changed.length - 3} more)` : ""}.` : ""} ${dirtyFiles.length ? `The likely cause is uncommitted changes to tracked fingerprint inputs -- git reports ${dirtyFiles.slice(0, 3).join(", ")}${dirtyFiles.length > 3 ? ` (and ${dirtyFiles.length - 3} more)` : ""} dirty in this checkout.` : "The likely cause is uncommitted changes to tracked fingerprint inputs (this check compared against a clean worktree of HEAD)."} (To measure this, doctor ran a real fingerprint twice and briefly created a temporary git worktree -- .git/worktrees metadata was touched and cleaned up.)`, "Commit the dirty fingerprint inputs, or list the build-irrelevant ones in .fingerprintignore (same syntax as .gitignore, at the project root; Stim already ignores android/local.properties, android/.idea, *.xcodeproj/xcuserdata, and ios/main.jsbundle and ios/assets while a .gitignore pattern matches them). Only the ones that genuinely cannot change the native build belong there -- generated reports, local env files, a lockfile whose checksums embed absolute machine paths. Never ignore a real native input (a Podfile, a gradle file, the app config) to force a hit: that trades a slow build for a wrong one.");
969
969
  }
970
970
  function fingerprintConfigSkipped(root) {
971
971
  const file = ["fingerprint.config.js", "fingerprint.config.cjs"].find((name) => existsSync$1(join$1(root, name)));